diff options
Diffstat (limited to 'ksh/kshrc.d/prompt.ksh')
-rw-r--r-- | ksh/kshrc.d/prompt.ksh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh index bf77f626..09c7de6e 100644 --- a/ksh/kshrc.d/prompt.ksh +++ b/ksh/kshrc.d/prompt.ksh @@ -22,6 +22,20 @@ function prompt { # count, and previous command return value PS1=$PS1'$(ret=$?;jobc=$(jobs -p|sed -n '\''$='\'');prompt pwd;prompt vcs;prompt job;prompt ret;:)' + # Add a helpful prefix if this shell appears to be exotic + typeset ksh + case $KSH_VERSION in + (*'93'*) ksh=ksh93 ;; + (*'PD KSH'*) ksh=pdksh ;; + (*'MIRBSD KSH'*) ksh=mksh ;; + esac + case ${SHELL##*/} in + ('') ;; + (ksh) ;; + ("$ksh") ;; + (*) PS1=$ksh:$PS1 ;; + esac + # Add prefix and suffix PS1='${PROMPT_PREFIX}'$PS1'${PROMPT_SUFFIX}' |