# For interactive shell # PROMPT PS1='[${LOGNAME-$USER}@${HOSTNAME} $( if [[ $PWD = "$HOME" ]]; then echo "~" elif [[ $PWD = "/${PWD##*/}" ]]; then print -r -- "$PWD" else print -r -- "${PWD##*/}" fi)]' if (( USER_ID == 0 )); then PS1+='# ' else PS1+='$ ' fi # EDITING FUNCTIONS set -o emacs bind '^I'=complete-list >/dev/null 2>&1 # search history with prefix support bind '^XA'=search-history-up bind '^XB'=search-history-down # SYSTEM WIDE ALIASES ETC. for i in /etc/shrc.d/*.sh; do [[ -e $i ]] || continue . "$i" done unset i HISTFILE=~/.history.mksh # vi:syntax=sh