1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

powerline-go: fix PROMPT_COMMAND duplicate in bash initialization (#7697)

This commit is contained in:
Giuseppe Ruggiero 2025-09-14 02:26:44 +02:00 committed by GitHub
parent 768a7042a6
commit 20c7963471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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
'';

View file

@ -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'
'';
}