diff options
author | alexg0 <alexg@alexland.org> | 2009-11-30 04:47:39 +0800 |
---|---|---|
committer | Leonid Volnitsky <leonid@volnitsky.com> | 2009-11-30 12:59:31 +0800 |
commit | 908a3733288f2d987b4f679d0b9a4304018c395a (patch) | |
tree | 6700669f862f9078fed97c185f6c9c37b4f18a67 /git-prompt.conf | |
parent | fixed: in locked state "git status" does not work (diff) | |
download | git-prompt-908a3733288f2d987b4f679d0b9a4304018c395a.tar.gz git-prompt-908a3733288f2d987b4f679d0b9a4304018c395a.tar.bz2 git-prompt-908a3733288f2d987b4f679d0b9a4304018c395a.zip |
Fixed errors related to running git-prompt.sh in Emacs shell-mode,
change prompt-char to '#' when root, allowed changing prompt-char
(eg. $) when user. Added Emacs backup (*~) files as .gitignore.
1. tput colors was being concatinated to '0'. Inside emacs shell
this is not valid, as `tput colors` is 0.
2. MC bug check was catching Emacs shell inferior mode. Now checking
for $INSIDE_EMACS variable.
3. Defined $prompt_char variable and $root_prompt_char
variable. Defaulting $root_prompt_char to '#'. Can just use \$, which
automatically changes between '$' and '#', but that would change
defalt behavior.
4. Fixed typo in a comment (cmd_cmd -> cwd_cmd).
Diffstat (limited to 'git-prompt.conf')
-rw-r--r-- | git-prompt.conf | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-prompt.conf b/git-prompt.conf index c4706c9..bdae7d5 100644 --- a/git-prompt.conf +++ b/git-prompt.conf @@ -46,7 +46,8 @@ ### directory, exit code, root color -# if [ 0`tput colors` -ge 8 ]; then # if terminal supports colors +# cols=`tput colors` +# if [[ -n "$cols" && $cols -ge 8 ]]; then # if terminal supports colors # dir_color=CYAN # rc_color=red # user_id_color=blue @@ -56,6 +57,10 @@ # rc_color=bw_bold # fi +### prompt character, default '>' for regular user, '#' for root +# prompt_char='>' +## prompt_char='$' +# root_prompt_char='#' ##### Per host color |