diff options
author | Bryson Steck <brysonsteck@protonmail.com> | 2022-10-26 12:05:56 -0600 |
---|---|---|
committer | Bryson Steck <brysonsteck@protonmail.com> | 2022-10-26 12:05:56 -0600 |
commit | c58abab9e5f14fdabb1ea8b314c370fb515b7b69 (patch) | |
tree | 373f7ecbeebb90ae9664138ffe0dfb1272584b9d /bash/.bash/02-prompt.bash | |
parent | 8a7a01214c68b6a4c2f6531d0d1dea6415fe9c89 (diff) | |
download | dotfiles-c58abab9e5f14fdabb1ea8b314c370fb515b7b69.tar dotfiles-c58abab9e5f14fdabb1ea8b314c370fb515b7b69.tar.gz dotfiles-c58abab9e5f14fdabb1ea8b314c370fb515b7b69.tar.bz2 |
havent updated these in a while
Diffstat (limited to 'bash/.bash/02-prompt.bash')
-rw-r--r-- | bash/.bash/02-prompt.bash | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/bash/.bash/02-prompt.bash b/bash/.bash/02-prompt.bash index 45c7821..62f835a 100644 --- a/bash/.bash/02-prompt.bash +++ b/bash/.bash/02-prompt.bash @@ -3,6 +3,7 @@ # 02-prompt.bash # bryson's gnarly bash prompt config # +shopt -s histappend # color definitions black='\e[0;30m' @@ -47,7 +48,7 @@ color4='\e[38;5;226m' function exit_code() { local ERROR="$?" if [[ ERROR -ne 0 ]]; then - echo -n ' \['"$RED"'\]'"$ERROR"'' + echo -n '\['"$RED"'\]'"$ERROR"' ' fi } @@ -74,7 +75,7 @@ function _git_prompt() { echo local`" fi if ! [[ "$branch" =~ local ]]; then - echo -n '\['"$color"'\] { git: '"$ansi"''"$branch"' } ' + echo -n '\['"$color"'\] ('"$ansi"''"$branch"') ' fi fi } @@ -99,12 +100,20 @@ function _git_prompt() { # [ bryson@hostname path ] # $ -export _PS1="\[\e[$lgray\][ \[$LBLUE\]\u\[$lcyan\]@\[$GREEN\]\h \[$LYELLOW\]\W \[$lgray\]]" -export _PS2="\[$dgray\]" +#export _PS1="\[\e[$lgray\][ \[$LBLUE\]\u\[$lcyan\]@\[$GREEN\]\h \[$LYELLOW\]\W \[$lgray\]]" +#export _PS2="\[$dgray\]" + +#export _PS1="\[\e[$lgray\]\[$LBLUE\]\u\[$lcyan\]@\[$GREEN\]\h \[$LYELLOW\]\W\[$lgray\]" + +# [ 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\] }" # define x titlebar TITLEBAR='\[\033]0;\u@\h:\w ($(history 1 | cut -c 8-))\]' # apply prompt and functions -export PROMPT_COMMAND='export PS1="$TITLEBAR${_status}${_PS1}$(exit_code)$(_git_prompt)\n${_PS2}\[$NC\]\$ "' +export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a' |