summaryrefslogtreecommitdiff
path: root/prompt
diff options
context:
space:
mode:
Diffstat (limited to 'prompt')
-rwxr-xr-xprompt26
1 files changed, 10 insertions, 16 deletions
diff --git a/prompt b/prompt
index 092e18e..14dd047 100755
--- a/prompt
+++ b/prompt
@@ -78,12 +78,12 @@
# replace symbolic colors names to raw treminfo strings
- eval git_modified="\$$git_modified"
- eval git_untracked="\$$git_untracked"
- eval git_clean="\$$git_clean"
- eval git_added="\$$git_added"
- eval git_op="\$$git_op"
- eval git_mixed="\$$git_mixed"
+ git_modified=${!git_modified}
+ git_untracked=${!git_untracked}
+ git_clean=${!git_clean}
+ git_added=${!git_added}
+ git_op=${!git_op}
+ git_mixed=${!git_mixed}
#####################################################################
LC_ALL=C
@@ -162,9 +162,9 @@ export -f set_shell_title
esac
- eval dir_color="\$$dir_color"
- eval rc_color="\$$rc_color"
- eval root_id_color="\$$root_id_color"
+ dir_color=${!dir_color}
+ rc_color=${!rc_color}
+ root_id_color=${!root_id_color}
########################################################### HOST
@@ -248,12 +248,6 @@ PROMPT_COMMAND='
git_dir=`git-rev-parse --git-dir 2> /dev/null`
if [[ $git_dir ]]; then
- ### status
- # clean(blue) nothing to commit (working directory clean)
- # modified(red) # Changed but not updated:
- # added(green) # Changes to be committed:
- # untracked(yellow) # Untracked files:
-
eval `git status |
sed -n "
s/^# On branch /branch=/p
@@ -321,7 +315,7 @@ PROMPT_COMMAND='
status=${status:-$untracked}
# at least one should be set
: ${status?prompt internal error: git status}
- eval git_color="\${git_$status}"
+ eval git_color=\${git_$status}
git_color=${git_color:-$WHITE}
### head