From 319ac2aec7787ae500eb3ff84020b7ca3e149298 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 4 Sep 2021 10:56:48 -0400 Subject: Remove title setting from bash prompt command. Tweak KSH support to play nice with oksh --- shell/conf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'shell/conf') diff --git a/shell/conf b/shell/conf index c6b78a4..4931758 100644 --- a/shell/conf +++ b/shell/conf @@ -26,6 +26,9 @@ if [ -e "$PRELOAD" ] ; then fi set_pager + +# note that the use of set_editor and _set_editor on oksh may +# change the input mode. ( set -o emacs ) after to go back set_editor # set_go @@ -37,19 +40,16 @@ setsudoaliases # checkSSHAgent -# Nasty conditional for support of many different shells -if - [ -n "$KSH_VERSION" ] || - [ "$SHELL" = "/bin/ksh" ] || - [ "$SHELL" = "/bin/mksh" ] || - [ "$SHELL" = "/usr/bin/mksh" ] || - [ "$SHELL" = "/usr/local/bin/mksh" ] -then +# Support various different shells +if [ -n "$KSH_VERSION" ] ; then export HISTFILE="$HOME/.ksh_history" + export HISTSIZE=10000 + set -o emacs bind ^L=clear-screen #shellcheck disable=SC2155 - export PS1="$(whoami)@$(hostname) \$PWD \$ " + # export PS1="$(whoami)@$(hostname) \$PWD \$ " + export PS1="$(whoami)@$(hostname)\$ " elif [ "$SHELL" = "/bin/sh" ] && [ "$(uname)" = "FreeBSD" ] ; then set -o emacs #shellcheck disable=SC2155 @@ -59,7 +59,7 @@ elif [ -n "$BASH" ] ; then HISTSIZE=10000 HISTFILESIZE=10000 shopt -s histappend - export PROMPT_COMMAND="set_my_title;history -a; history -c; history -r" + export PROMPT_COMMAND="history -a; history -c; history -r" fi if [ $COLOR -eq 1 ] ; then -- cgit v1.2.3