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

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.

In short, consistency considerations.

I asked if somebody was against this change. In a couple weeks I got some
personal replies "go ahead" and none said "no". So I committed it. Change
it back if you wish; I guess I just stop using %l in prompt again then :-)

-andrej




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