mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
powerline-go: fix PROMPT_COMMAND duplicate in bash initialization (#7697)
This commit is contained in:
committed by
GitHub
parent
768a7042a6
commit
20c7963471
@@ -165,7 +165,9 @@ in
|
||||
}
|
||||
|
||||
if [ "$TERM" != "linux" ]; then
|
||||
PROMPT_COMMAND="_update_ps1;$PROMPT_COMMAND"
|
||||
if [[ ";''${PROMPT_COMMAND:-};" != *";_update_ps1;"* ]]; then
|
||||
PROMPT_COMMAND="_update_ps1''${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
@@ -26,5 +26,8 @@
|
||||
assertFileContains \
|
||||
home-files/.bashrc \
|
||||
'/bin/powerline-go -error $old_exit_status -shell bash -modules nix-shell -newline -path-aliases \~/project/foo=prj-foo -ignore-repos /home/me/project1,/home/me/project2'
|
||||
assertFileContains \
|
||||
home-files/.bashrc \
|
||||
'if [[ ";''${PROMPT_COMMAND:-};" != *";_update_ps1;"* ]]; then'
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user