X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=admin%2Fprog%2Fbash_prompt;h=14543705585b52f6ed8d8de2f54a1d0cd7466c5c;hb=44bc3c3f9a5cdaddf8bad3f0c87e2237bbbb03c6;hp=02141e3581ab17bf4400720b642e256a7872159d;hpb=7cd9e77a605d4c413110e410d44efcebae9c4d14;p=dotfiles.git diff --git a/admin/prog/bash_prompt b/admin/prog/bash_prompt index 02141e3..1454370 100644 --- a/admin/prog/bash_prompt +++ b/admin/prog/bash_prompt @@ -6,6 +6,10 @@ cgmem_which_prompt() { fi } +# 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\$ ' }