]> git.donarmstrong.com Git - zsh.git/commitdiff
use … in prompt expansion truncation
authormartin f. krafft <madduck@madduck.net>
Mon, 18 May 2009 18:04:30 +0000 (20:04 +0200)
committermartin f. krafft <madduck@madduck.net>
Mon, 18 May 2009 18:04:30 +0000 (20:04 +0200)
.zsh/zshrc/60_vcsprompt
.zsh/zshrc/80_prompt

index 399d3445f637c98674c69bee87c0e70cc5baf836..aeabd7744054d431ec6e7f93a2ce7009af9d3d3e 100644 (file)
@@ -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
index d687dd6086888cc006742acd60887683a1873171..5ddbe823dfe7f8c14625ffae85f17cf54e30f6a6 100644 (file)
@@ -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