1
0
Fork 0

Autocommitted updated scripts from mari-wovn

main
Mari 4 years ago
parent e1fe674ead
commit 95225356a1
  1. 15
      bash_aliases.sh

@ -127,4 +127,17 @@ ssh_find_agent -a || eval $(ssh-agent) > /dev/null
export GITAWAREPROMPT="$COMMON_CONFIGS_PATH"/git-aware-prompt
. "$GITAWAREPROMPT"/main.sh
PS1='\[$bldred\]${debian_chroot:+($debian_chroot)}\[$txtrst\]\[$txtpur\]\u\[$txtrst\]\[$txtylw\]@\[$txtrst\]\[$txtblu\]\h\[$txtrst\]:\[$bldgrn\]\w\[$txtrst\] \[$txtcyn\]$git_branch\[$txtrst\]\[$bldred\]${git_dirty}\[$txtrst\]\n\$ '
function prettylastexit() {
local exitcode=$?
if [[ -z $exitcode ]]; then
echo "[---]\[$txtrst\] "
elif [[ $exitcode == 0 ]]; then
echo "\[$txtgrn\][ OK]\[$txtrst\] "
else
printf "\[$txtred\][%3.3s]\[$txtrst\] " "$exitcode"
fi
}
PROMPT_COMMAND="update_lastexit; ${PROMPT_COMMAND}"
PS1='$(prettylastexit)\[$bldred\]${debian_chroot:+($debian_chroot)}\[$txtrst\]\[$txtpur\]\u\[$txtrst\]\[$txtylw\]@\[$txtrst\]\[$txtblu\]\h\[$txtrst\]:\[$bldgrn\]\w\[$txtrst\] \[$txtcyn\]$git_branch\[$txtrst\]\[$bldred\]${git_dirty}\[$txtrst\]\n\$ '

Loading…
Cancel
Save