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

Re: Prompt expansion, multi-job for



On Thu, Jan 06, 2000 at 03:44:26PM +0300, Andrej Borsenkow wrote:

> > surprises there.  What I'd like to do is trim each path element to one
> > character unless it's the last path element, in which case it should be
> > displayed to a maximum of, say, 15 characters.  eg, /usr/local/src should be
> > displayed as "/u/l/src", /usr/local/src/linux would be displayed as
> > "/u/l/s/linux", and /usr/local/src/linux-2.2.14+reiserfs+raid+ide might be
> > displayed as "/u/l/s/linux-2.2.14...".  Is this possible with the current
> 
> In  the current zsh
> 
> bor@itsrm2% echo ${PWD//(#m)[^\\/]##\\//$MATCH[1]/}
> /t/s/zsh-3.1.6-dev-14

    Thanks; I might wait for 3.1.7 to try it out.  It appears that 3.1.6
doesn't support it (at least my 3.1.6 returns 'zsh: bad pattern:
(#m)[^/]##/').

    While on the subject of prompt stuff, is there any reason why the
'PROMPT EXPANSION' section of the zsh manual is under zshmisc.1?  Would it
be more sensible to put it in zshexpn.1?


-- 
: Andre Pang <andrep@xxxxxxxxxxx> - Purruna Pty Ltd - ph# 0411.882299 :
:               #ozone - http://www.vjolnir.org/ozone/                :



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