diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-06-24 18:32:23 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-06-24 18:32:23 +1200 |
commit | 962aa9e4b272d9bcdb23df889680a424d6dbfa5e (patch) | |
tree | 4dacb8cd1c7f76b3c83616b46044811e64900a4c /bash | |
parent | Remove Bashism from Bourne shell profile (diff) | |
download | dotfiles-962aa9e4b272d9bcdb23df889680a424d6dbfa5e.tar.gz dotfiles-962aa9e4b272d9bcdb23df889680a424d6dbfa5e.zip |
Fix broken return value prompt element
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index f82ef12f..346961a5 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -1,7 +1,8 @@ # Frontend to controlling prompt function prompt { + local ret=$? local colors=$(tput colors 2>/dev/null) - local color reset branch head state url root ret + local color reset branch head state url root if [[ $colors -ge 256 ]]; then color='\[\e[38;5;10m\]' @@ -66,7 +67,6 @@ function prompt { # Return status prompt function return) - ret=$? [[ $ret -ne 0 ]] && printf '<%d>' ${ret} ;; |