]> git.phdru.name Git - dotfiles.git/blobdiff - .shellrc
.shellrc: Add the current directory for `mc`
[dotfiles.git] / .shellrc
index fd73f152065c9795cfab10fdfef5686b62d76f2d..aef34517a6a4f9b6bba036f0479f3a5a5fe47f01 100644 (file)
--- 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