X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=zsh%2F.zsh%2Frc%2F015prompt.zsh;h=9a6219ac2396cdc9e7160f3c8e3e4f5c62fb8185;hb=0e026879717deecd27b7797736321a6bdce03505;hp=158ce98666ebab0ae1cc19db52e18b8588df6ccf;hpb=a4eb8a3b2d5d4d91d8a1af8146192ae56f38d945;p=dotfiles.git diff --git a/zsh/.zsh/rc/015prompt.zsh b/zsh/.zsh/rc/015prompt.zsh index 158ce98..9a6219a 100644 --- a/zsh/.zsh/rc/015prompt.zsh +++ b/zsh/.zsh/rc/015prompt.zsh @@ -1,12 +1,15 @@ setopt PROMPT_SUBST PROMPT="%2~ %B" +# A: autoenv +# V: virtualenv +# M: laxed umask PROMPT+='${(j::)psvar}' PROMPT+="%(1j.%j.)%b" PROMPT+='%U${vcs_info_msg_0_}%u' PROMPT+="%(?.. %S%?%s)" PROMPT+='%(1S. %B${SECONDS}%b.)' -PROMPT+='%B%F{magenta}%#%f%b ' +PROMPT+='%B%F{magenta}%#%f%b ' function zle-line-init zle-keymap-select { local ccolour=red @@ -18,6 +21,9 @@ function zle-line-init zle-keymap-select { [[ -z "$VIRTUAL_ENV" ]] && psvar=(${psvar#V}) || { [[ -n "${psvar[(r)V]}" ]] || psvar=(V $psvar) } + [[ `umask` == "077" ]] && psvar=(${psvar#M}) || { + [[ -n "${psvar[(r)M]}" ]] || psvar=("M" $psvar) + } zle reset-prompt }