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 "
mc() {
if test -n "$BASH_VERSION"; then
MC_SAVE_OPS1="$OPS1"
- OPS1="\u@\h "
+ OPS1="\u@\h \W "
fi
if [ -n "$SLOWTERM" ]; then