X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=admin%2Fprog%2Fbash_prompt;h=dc6f2935545b54d29213ac6850af837d59211a18;hb=5ffe65c22c7d5be88defda6f282b10ddbfd2fce0;hp=aedf458e7b192eb600b5774c0d843fefb1e1cc9b;hpb=8c72229bb26bef89357f55320fb1d7b06a7b4aa8;p=dotfiles.git diff --git a/admin/prog/bash_prompt b/admin/prog/bash_prompt index aedf458..dc6f293 100644 --- a/admin/prog/bash_prompt +++ b/admin/prog/bash_prompt @@ -2,10 +2,15 @@ cgmem_which_prompt() { local _cgmem_which _cgmem_which="`cgmem_which 2>/dev/null`" if [ -n "$_cgmem_which" ]; then - echo "[$_cgmem_which] " + _cgmem_which=" $_cgmem_which" fi + echo "$_cgmem_which" } +# Cut directories to 20% of the terminal width; add space for 3 dots +_DIR_LENGTH=`awk "END { print int(0.2 * ${COLUMNS:-80}) }" /dev/null 2>&1; then #if [ "`type -t __git_ps1`" = function ]; then - # OPS1+="\$(__git_ps1)" + # PS1+='$(__git_ps1)' #else - OPS1+="\$(prompt_git)" + PS1+='$(prompt_git)' #fi fi - # This is for .screenrc: shelltitle "\$ |$SHELL" - #OPS1+="\[\033k\033\\\\\]" - OPS1+=" \$SHLVL\\$ " - export OPS1 + PS1+=' $SHLVL\$ ' }