From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15116 invoked from network); 6 Jan 2000 14:42:47 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jan 2000 14:42:47 -0000 Received: (qmail 20051 invoked by alias); 6 Jan 2000 14:42:33 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2838 Received: (qmail 20043 invoked from network); 6 Jan 2000 14:42:30 -0000 Date: Fri, 7 Jan 2000 01:46:39 +1100 From: Andre Pang To: Andrej Borsenkow Cc: zsh-users@sunsite.auc.dk Subject: Re: Prompt expansion, multi-job for Message-ID: <20000107014639.A333@bozar.ihug.com.au> Reply-To: Andre Pang Mail-Followup-To: Andrej Borsenkow , zsh-users@sunsite.auc.dk References: <20000106194432.A488@bozar.ihug.com.au> <000701bf5843$c3f6fca0$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <000701bf5843$c3f6fca0$21c9ca95@mow.siemens.ru>; from Andrej.Borsenkow@mow.siemens.ru on Thu, Jan 06, 2000 at 03:44:26PM +0300 Sender: andrep@vjolnir.org 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 - Purruna Pty Ltd - ph# 0411.882299 : : #ozone - http://www.vjolnir.org/ozone/ :