commit 3def66eefa8c2a5b36899ed7d88996238c5a9656 parent 9577839a2ec9f238b3faedc04d31564ffdfeeeb8 Author: pyratebeard <root@pyratebeard.net> Date: Tue, 8 Mar 2022 21:26:23 +0000 change prompt colour if running shell from vim Diffstat:
M | zsh/.zsh/prompt.zsh | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/zsh/.zsh/prompt.zsh b/zsh/.zsh/prompt.zsh @@ -98,7 +98,12 @@ PROMPT='${USER_LEVEL}[${COLOR_NORMAL}%~${USER_LEVEL}]$(GIT_PROMPT)── - %f' # tiny tiny) #PROMPT='%F{3} %%${COLOR_NORMAL} ' -PROMPT='%F{3} ──── ─${COLOR_NORMAL} ' +# change prompt colour if started from vim +if [[ -v VIMRUNTIME ]] ; then + PROMPT='%F{9} ──── ─${COLOR_NORMAL} ' +else + PROMPT='%F{3} ──── ─${COLOR_NORMAL} ' +fi RPROMPT='%F{15}%~ $(GIT_PROMPT) %F{11}${HOSTNAME}${COLOR_NORMAL}' ;; # classic