X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.shellrc;h=aef34517a6a4f9b6bba036f0479f3a5a5fe47f01;hb=e886fa67844c874f1a7229f7bd14dc0a90534f27;hp=fd73f152065c9795cfab10fdfef5686b62d76f2d;hpb=d992db58d6cb4f4a2bb2218e3299511ebc629b6b;p=dotfiles.git diff --git a/.shellrc b/.shellrc index fd73f15..aef3451 100644 --- a/.shellrc +++ b/.shellrc @@ -58,7 +58,13 @@ case "$HOME" in esac -OPS1="$OPS1\\$" +# Remove trainling \$s +OPS1="`echo $OPS1 | sed 's/[ \\$]\+$//'`" +# Add a trainling space +OPS1="$OPS1 " +# Re-add trainling \$ +for ((i=0; i<$SHLVL; i++)); do OPS1="$OPS1\\$"; done + PS1="$OPS1 " @@ -338,7 +344,7 @@ include() { mc() { if test -n "$BASH_VERSION"; then MC_SAVE_OPS1="$OPS1" - OPS1="\u@\h " + OPS1="\u@\h \W " fi if [ -n "$SLOWTERM" ]; then