diff options
author | Bryson Steck <brysonsteck@protonmail.com> | 2023-04-02 22:20:09 -0600 |
---|---|---|
committer | Bryson Steck <brysonsteck@protonmail.com> | 2023-04-02 22:20:09 -0600 |
commit | 2d1191a092a26997d3b177d1d3f3a315cdd4a38e (patch) | |
tree | 3c20759c47a3d04fc5787461a6b707437277037a /bash/.bash/02-prompt.bash | |
parent | 290247d424e6a91fa04b69a1c17ace583bd92290 (diff) | |
download | dotfiles-2d1191a092a26997d3b177d1d3f3a315cdd4a38e.tar dotfiles-2d1191a092a26997d3b177d1d3f3a315cdd4a38e.tar.gz dotfiles-2d1191a092a26997d3b177d1d3f3a315cdd4a38e.tar.bz2 |
another cool update
Diffstat (limited to 'bash/.bash/02-prompt.bash')
-rw-r--r-- | bash/.bash/02-prompt.bash | 21 |
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' |