From: Oleg Broytman Date: Mon, 22 Feb 2016 23:59:29 +0000 (+0300) Subject: .shellrc: save/reset/restore OPS1 for mc X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ee75421fb5ca715db48b3ff2c8eeb3f1fc773180;p=dotfiles.git .shellrc: save/reset/restore OPS1 for mc --- diff --git a/.shellrc b/.shellrc index 124aef1..acb5c52 100644 --- a/.shellrc +++ b/.shellrc @@ -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 }