From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21934 invoked from network); 28 Jun 1999 09:32:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jun 1999 09:32:56 -0000 Received: (qmail 23172 invoked by alias); 28 Jun 1999 09:32:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6891 Received: (qmail 23165 invoked from network); 28 Jun 1999 09:32:41 -0000 Date: Mon, 28 Jun 1999 11:32:40 +0200 (MET DST) Message-Id: <199906280932.LAA25141@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Mon, 28 Jun 1999 11:00:37 +0200 Subject: Re: PATCH: pws-24: prompt escapes for script/function and lineno 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@informatik.hu-berlin.de