X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.shellrc;h=acb5c52d707ff4c9fd75d448a630f7aa71999744;hb=ee75421fb5ca715db48b3ff2c8eeb3f1fc773180;hp=0bf59ff5e99ff8aa2d56a5d3bbdd12f9758b3099;hpb=0846cd31338324903ef8862b47ebaaf3d268545e;p=dotfiles.git diff --git a/.shellrc b/.shellrc index 0bf59ff..acb5c52 100644 --- a/.shellrc +++ b/.shellrc @@ -95,7 +95,7 @@ esac # clear history, clear screen and logout -#chlo() { cd; unset HISTFILE; rm -f .sh_history; clo; } +#chlo() { cd; unset HISTFILE; rm -f .sh_history; history -c; clo; } #Pwd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)\/\(.*\)\/\(.*\)/...\/\2\/\3\/\4/"; } @@ -138,6 +138,13 @@ include() mc() { + case "$SHELL" in + */bash) + MC_SAVE_OPS1="$OPS1" + OPS1="\u@\h " + ;; + esac + if [ -n "$SLOWTERM" ]; then MC_SLOW="--slow" fi @@ -198,8 +205,11 @@ mc() { rc=1 fi + [ -n "$MC_SAVE_OPS1" ] && OPS1="$MC_SAVE_OPS1" [ -n "$MC_SAVE_TERM" ] && TERM="$MC_SAVE_TERM" - unset MC_FOUND MC_PWD_FILE MC_SAVE_TERM MC_SLOW MC_TMP_DIR MC_XTERM + unset MC_FOUND MC_PWD_FILE MC_SAVE_OPS1 MC_SAVE_TERM \ + MC_SLOW MC_TMP_DIR MC_XTERM + return $rc }