Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Prompt expansion, multi-job for
- X-seq: zsh-users 2838
- From: Andre Pang <andrep-ml@xxxxxxxxxxx>
- To: Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- Subject: Re: Prompt expansion, multi-job for
- Date: Fri, 7 Jan 2000 01:46:39 +1100
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <000701bf5843$c3f6fca0$21c9ca95@xxxxxxxxxxxxxx>; from Andrej.Borsenkow@xxxxxxxxxxxxxx on Thu, Jan 06, 2000 at 03:44:26PM +0300
- Mail-followup-to: Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000106194432.A488@xxxxxxxxxxxxxxxxx> <000701bf5843$c3f6fca0$21c9ca95@xxxxxxxxxxxxxx>
- Reply-to: Andre Pang <andrep@xxxxxxxxxxx>
- Sender: andrep@xxxxxxxxxxx
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