zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>,
	Clint Adams <schizo@debian.org>
Cc: <nobse@debian.org>, <101083@bugs.debian.org>, <zsh-workers@sunsite.dk>
Subject: Re: %l prompt expansion change
Date: Wed, 20 Jun 2001 17:01:08 +0000	[thread overview]
Message-ID: <1010620170108.ZM8579@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.SV4.4.33.0106192227350.22350-100000@itsrm2.mow.siemens.ru>

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   


  reply	other threads:[~2001-06-20 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010619140521.A13262@dman.com>
     [not found] ` <handler.s.R.99297392428467.info.0@bugs.debian.org>
2001-06-19 18:10   ` Clint Adams
2001-06-19 18:34     ` Andrej Borsenkow
2001-06-20 17:01       ` Bart Schaefer [this message]
2001-06-20 17:34         ` Andrej Borsenkow
2001-06-20 17:38           ` Clint Adams
2001-06-20 17:52             ` Andrej Borsenkow
2001-06-20 18:24               ` Wayne Davison
2001-06-21  9:46                 ` PATCH: %y modifier in prompt substitution " Andrej Borsenkow
2001-06-22  8:26                   ` Andrej Borsenkow
2001-06-22  9:31                     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010620170108.ZM8579@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=101083@bugs.debian.org \
    --cc=Andrej.Borsenkow@mow.siemens.ru \
    --cc=nobse@debian.org \
    --cc=schizo@debian.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).