From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17915 invoked from network); 20 Jun 2001 17:04:30 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Jun 2001 17:04:30 -0000 Received: (qmail 4344 invoked by alias); 20 Jun 2001 17:03:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14996 Received: (qmail 4314 invoked from network); 20 Jun 2001 17:03:50 -0000 From: "Bart Schaefer" Message-Id: <1010620170108.ZM8579@candle.brasslantern.com> Date: Wed, 20 Jun 2001 17:01:08 +0000 In-Reply-To: Comments: In reply to Andrej Borsenkow "Re: %l prompt expansion change" (Jun 19, 10:34pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Andrej Borsenkow , Clint Adams Subject: Re: %l prompt expansion change Cc: , <101083@bugs.debian.org>, MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 19, 10:34pm, Andrej Borsenkow wrote: } Subject: Re: %l prompt expansion change } } On Tue, 19 Jun 2001, Clint Adams wrote: } } > > PS1='<%?>%n@%m[%l]:%~%# ' } > > <0>tretkowski@infinity[tty9]:~% } > > ^^^ } > > When I use a zsh binary from potato, %l is handled correct: } > > } > > <0>tretkowski@infinity[tty9]:~% ./zsh <-- potato binary } > > <0>tretkowski@infinity[9]:~% } > } > Can you explain what makes this incorrect rather than aesthetic? } } Well, mostly aesthetic considerations. It is `0' om /dev/tty0 and pts/3 or } term/4 somewhere else. Also, ps usually shows tty line as base name sans } /dev/. And not every Unix is Linux yet to treat /dev/tty* specially. The treatment of /dev/tty* has nothing to do with Linux, and everything to do with old BSD around 4.2, where real TTYs were named /dev/ttyt* and PTYs were named /dev/ttyp*, and the intent was to have %l expand to e.g. "t9" or "p9". The idea of logging in on a real system console with a /dev/tty<-> name probably never occurred to PF -- unix machines were almost exclusively time-sharing when this code was first written. I can almost guarantee that PF never expected %l to expand to include an entire directory name like "pts/" or "term/". Prompts are intended to be extremely concise, to maximize editing space. That's why RPROMPT came to exist: a prompt that could be verbose but would get out of the way when your command line got long. } I asked if somebody was against this change. Well, we asked if anybody was against the HIST_NO_STORE change, too, and now Vincent is complaining about it. Probably we should ask these kinds of questions on zsh-users (without including the proposed patch). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net