From 564505447e19354e596f303ab562fedca576589d Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 3 Sep 2023 00:13:21 -0600 Subject: who knows lmao --- bash/.bash/02-prompt.bash | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'bash/.bash/02-prompt.bash') diff --git a/bash/.bash/02-prompt.bash b/bash/.bash/02-prompt.bash index 8181d33..035f216 100644 --- a/bash/.bash/02-prompt.bash +++ b/bash/.bash/02-prompt.bash @@ -48,8 +48,10 @@ color4='\e[38;5;226m' function exit_code() { local ERROR="$?" if [[ ERROR -ne 0 ]]; then - echo -n '\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]!' + echo -n ''"$dgray"'\]/\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]\\' # echo -n '\['"$RED"'\]'"$ERROR"' ' + else + echo -n ''"$dgray"'\]/\['"$LCYAN"'\]'"$ERROR"'\['"$dgray"'\]\\' fi } @@ -77,7 +79,7 @@ function _git_prompt() { fi if ! [[ "$branch" =~ local ]]; then # echo -n '\['"$color"'\] ('"$ansi"''"$branch"') ' - echo -n '\['"$dgray"'\]#\['"$color"'\]'"$branch"''"$ansi"'' + echo -n '\['"$dgray"'\](\['"$color"'\]'"$branch"''"$ansi"'\['"$dgray"'\])' fi fi } @@ -116,15 +118,18 @@ export -f _git_prompt # export _PS1="\[$lgray\][ \[$LMAGENTA\]\h\[$lgray\] ] \[$LYELLOW\]\d, \[$LRED\]\T" # export _PS2="\[$lgray\]{ \[$CYAN\]\w\[$lgray\] }" -# bryson@dingo:/current/path:master +# bryson@hostname:/current/path:master # $ -# -export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w" +# export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w" + +# hostname[/current/path]{12:00:00}[255](master) +# $ +export _PS1="\[$LGREEN\]\h\[$dgray\][\[$LYELLOW\]\w\[$dgray\]]<\[$LBLUE\]\u\[$dgray\]>{\[$LMAGENTA\]\@\[$dgray\]}" # 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}$(_git_prompt)\n\[$NC\]\$ ";history -a' +export PROMPT_COMMAND='export PS1="$TITLEBAR${_PS1}$(exit_code)$(_git_prompt)\n\[$NC\]\$ ";history -a' -- cgit v1.2.3