diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-03-30 13:14:40 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-03-30 13:14:40 +0200 |
commit | 75d7afd9ef93c71aecab080bced4a5a6011d8e9a (patch) | |
tree | b411e2860e4203ab7845e8f643511d15b2a4b921 /zshrc | |
parent | e97fc6e487a374be0eded5ac2c7d6d8a006e90ca (diff) | |
download | dotfiles-75d7afd9ef93c71aecab080bced4a5a6011d8e9a.tar.gz dotfiles-75d7afd9ef93c71aecab080bced4a5a6011d8e9a.zip |
zshrc: updated base16 propmpt
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -198,6 +198,11 @@ function printBase16() { done } +# https://github.com/ohmyzsh/ohmyzsh/issues/5068 +function shpwd() { + echo ${${:-/${(j:/:)${(M)${(s:/:)${(D)PWD:h}}#(|.)[^.]}}/${PWD:t}}//\/~/\~} +} + function _installMyPrompt() { function zle-line-init zle-keymap-select { vinorm='n' @@ -217,8 +222,7 @@ function _installMyPromptBase16() { vinorm='n' viins='i' c_del='%F{7}' - c_usr='%F{6}' - c_hos='%F{5}' + c_usr='%F{2}' c_tty='%F{8}' c_dir='%F{14}' c_dir2='%F{242}' @@ -236,7 +240,7 @@ function _installMyPromptBase16() { GIT_PROMPT_AHEAD="${c_del}:${c_git_ahead}↑" GIT_PROMPT_SUFFIX="${c_del})$color[noColor] " - PS1="$c_usr%n$c_del::$c_hos%m$c_del:$c_dir%2~$color[noColor] [$vimode] $(git_info)$c_ret%(?..%? )$c_del$color[noColor]> " + PS1="$c_usr%n@%m:$c_dir$(shpwd)$color[noColor] ::<$vimode> $(git_info)$c_ret%(?..%? )$c_del$color[noColor]> " RPS1="%F$c_dir2%~$color[noColor]" zle reset-prompt } |