Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pws-24: prompt escapes for script/function and lineno
- X-seq: zsh-workers 6891
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: pws-24: prompt escapes for script/function and lineno
- Date: Mon, 28 Jun 1999 11:32:40 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Mon, 28 Jun 1999 11:00:37 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> This implements the prompt escape %N for the nearest enclosing
> script/sourced file/function, and %i for the corresponding line number
> (sorry, %l, %L and %n were taken). The main reason for having these is
> that the PROMPT_SUBST option is set by emulation, so an `emulate zsh' will
> turn it off, hence sticking $0 and $LINENO in PS4 is only partially
> successful, and expecting functions to set it seems unfair. Another reason
> is that, because of FUNCTION_ARGZERO, it's not always possible to get the
> name of whatever's being executed as the internal scriptname variable isn't
> directly accessible. I hope this seems reasonable. People used to
> complain when you added new % sequences, but with the size of the code
> nowadays maybe they don't.
;-) That's why I didn't dare to suggest something like this.
> Maybe we should make '+%N:%i:%_> ' or something such the default PS4?
Fine. (Many users wouldn't realise it otherwise, I think.)
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author