s scp ssh smbclient tcpdump tshark wireshark; do
! has_completion $cmd && complete -o default -A hostname $cmd;
done
+ unset has_completion
complete -A job bg fg j jobs wait
complete -A variable unset
# 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/"; }
mc() {
+ case "$SHELL" in
+ */bash)
+ MC_SAVE_OPS1="$OPS1"
+ OPS1="\u@\h "
+ ;;
+ esac
+
if [ -n "$SLOWTERM" ]; then
MC_SLOW="--slow"
fi
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
}