Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: %<< and %{%}



On Mar 1, 12:26am, Tanaka Akira wrote:
} Subject: %<< and %{%}
}
} I heard that the combination of %<< and %{%} in prompt doesn't work well.
} 
} Z(2):akr@is27e1u11% Src/zsh -f
} is27e1u11% cd /usr/local/bin
} is27e1u11% PS1=$'[%20<..<%/]'
} [/usr/local/bin]PS1=$'[%20<..<%/]%{\e[33m%}'
} [../local/bin]
} 
} Hm.  The string in %{..%} is affected to truncation.  It is wrong.

Maybe, but (I think) so is your usage of %<..<, since zsh-workers/4601.
I believe you want something like

PS1=$'[%20<..<%/%<<]%{\e[33m%}'

There does seem to be a bug with handling of turncations inside the %()
conditional construct; if the truncation is in the "true" branch, then
the false branch and the trailing `)' are left as part of the prompt.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author