1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +02:00

[bash] Fix the PS1 (return code)

This commit is contained in:
Hyacinthe Cartiaux 2015-06-30 16:09:57 +02:00
parent 292888e3c0
commit d84b23e590

View file

@ -179,7 +179,7 @@ fi
# exit status of the last run command.
# Exit status 130 is also considered as good as it corresponds to a CTRL-D
__colorized_exit_status() {
printf -- "$(status=\$? ; if [[ \$status = 0 || \$status = 130 ]]; then \
printf -- "\$(status=\$? ; if [[ \$status = 0 || \$status = 130 ]]; then \
echo -e '\[\e[01;32m\]'\$status; \
else \
echo -e '\[\e[01;31m\]'\$status; fi)"