aboutsummaryrefslogtreecommitdiff
path: root/bash/.bash/02-prompt.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/.bash/02-prompt.bash')
-rw-r--r--bash/.bash/02-prompt.bash21
1 files changed, 16 insertions, 5 deletions
diff --git a/bash/.bash/02-prompt.bash b/bash/.bash/02-prompt.bash
index 603b292..8181d33 100644
--- a/bash/.bash/02-prompt.bash
+++ b/bash/.bash/02-prompt.bash
@@ -48,7 +48,8 @@ color4='\e[38;5;226m'
function exit_code() {
local ERROR="$?"
if [[ ERROR -ne 0 ]]; then
- echo -n '\['"$RED"'\]'"$ERROR"' '
+ echo -n '\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]!'
+ # echo -n '\['"$RED"'\]'"$ERROR"' '
fi
}
@@ -75,11 +76,15 @@ function _git_prompt() {
echo local`"
fi
if ! [[ "$branch" =~ local ]]; then
- echo -n '\['"$color"'\] ('"$ansi"''"$branch"') '
+ # echo -n '\['"$color"'\] ('"$ansi"''"$branch"') '
+ echo -n '\['"$dgray"'\]#\['"$color"'\]'"$branch"''"$ansi"''
fi
fi
}
+export -f exit_code
+export -f _git_prompt
+
# prompt building
# (2 unicode)[ bryson@hostname ] { /current/path }
# (unicode) $
@@ -108,12 +113,18 @@ function _git_prompt() {
# [ hostname ] Thu Mar 25, 10:00:00 AM, /dev/pts/0
# { /current/path } 8 files, 64 KB (master)
# $
-export _PS1="\[$lgray\][ \[$LBLUE\]\h\[$lgray\] ] \[$LCYAN\]\d, \[$GREEN\]\T"
-export _PS2="\[$lgray\]{ \[$LYELLOW\]\w\[$lgray\] }"
+# export _PS1="\[$lgray\][ \[$LMAGENTA\]\h\[$lgray\] ] \[$LYELLOW\]\d, \[$LRED\]\T"
+# export _PS2="\[$lgray\]{ \[$CYAN\]\w\[$lgray\] }"
+
+# bryson@dingo:/current/path:master
+# $
+#
+export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w"
# define x titlebar
TITLEBAR='\[\033]0;\u@\h:\w ($(history 1 | cut -c 8-))\]'
# apply prompt and functions
-export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a'
+# export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a'
+export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}$(_git_prompt)\n\[$NC\]\$ ";history -a'