diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-25 14:31:32 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-25 14:31:32 +1300 |
commit | e3f97d6c12e6e311b155ce24ce586717b1abc18b (patch) | |
tree | 4d7f5c0556499331218bf2897ef04bc2962aca12 /zsh/zshrc.d/prompt.zsh | |
parent | Move Zsh keybinding setup to after ENV sourcing (diff) | |
download | dotfiles-e3f97d6c12e6e311b155ce24ce586717b1abc18b.tar.gz dotfiles-e3f97d6c12e6e311b155ce24ce586717b1abc18b.zip |
Show prompt prefix if a shell is exotic
That is, include e.g. "ksh:" as a prefix to the prompt if the user
appears to have Bash or Zsh (or anything else) as their login shell.
This is probably imperfect, but it's a start.
Diffstat (limited to 'zsh/zshrc.d/prompt.zsh')
-rw-r--r-- | zsh/zshrc.d/prompt.zsh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh index cfac7ffd..f374dbec 100644 --- a/zsh/zshrc.d/prompt.zsh +++ b/zsh/zshrc.d/prompt.zsh @@ -18,6 +18,12 @@ prompt() { # Add sub-commands; VCS, job, and return status checks PS1=$PS1'$(ret=$?;prompt vcs;prompt job;prompt ret)' + # Add a helpful prefix if this shell appears to be exotic + case ${SHELL##*/} in + (zsh) ;; + (*) PS1=zsh:$PS1 ;; + esac + # Add prefix and suffix PS1='${PROMPT_PREFIX}'$PS1'${PROMPT_SUFFIX}' |