From: martin f. krafft Date: Mon, 18 May 2009 18:04:30 +0000 (+0200) Subject: use … in prompt expansion truncation X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/ba5bd95983d7b78f798c44022dfafac797b89228 use … in prompt expansion truncation --- diff --git a/.zsh/zshrc/60_vcsprompt b/.zsh/zshrc/60_vcsprompt index 399d344..aeabd77 100644 --- a/.zsh/zshrc/60_vcsprompt +++ b/.zsh/zshrc/60_vcsprompt @@ -100,7 +100,7 @@ __vcs_get_prompt_path_components() # shortcut: if there are no arguments, return a default prompt if [ -z "${1:-}" ]; then - pwdnamed="${(%):-%${_PROMPT_PATH_MAXLEN}<..<%~%<<}" + pwdnamed="${(%):-%${_PROMPT_PATH_MAXLEN}<…<%~%<<}" echo "$pwdnamed" return fi @@ -138,7 +138,7 @@ __vcs_get_prompt_path_components() prelen=$((${_PROMPT_PATH_MAXLEN:-25} - $#branch - $#postfix)) minlen=${_PROMPT_PATH_MINLEN:-10} (( $prelen < $minlen )) && prelen=$minlen - prefix="${(%):-%${prelen}<..<%-${precomps}~%<<}" + prefix="${(%):-%${prelen}<…<%-${precomps}~%<<}" echo "'$prefix'" "'$branch'" "'$postfix'" } @@ -182,7 +182,7 @@ __vcs_set_prompt_variables() NONE) :;; *) warn "$repotype repositories not (yet) supported in the prompt";; esac - local p="%${MAXLEN}<..<%~%<<" + local p="%${MAXLEN}<…<%~%<<" #TODO find a better way so we don't have to nuke $psvar, but since the # %(nv.true.false) check for prompts checks element count, not # content, that's all we get for now diff --git a/.zsh/zshrc/80_prompt b/.zsh/zshrc/80_prompt index d687dd6..5ddbe82 100644 --- a/.zsh/zshrc/80_prompt +++ b/.zsh/zshrc/80_prompt @@ -11,7 +11,7 @@ if [ "${PS1:-}" = '%m%# ' ]; then local _MIDDLE="%1v%(2v.|%B%2v%b|.)%(3v.%3v.)" if is_root; then - _MIDDLE="%25<..<%~%<<" + _MIDDLE="%25<…<%~%<<" local _PS1_HL=U fi