From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18910 invoked from network); 5 Apr 2000 08:16:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Apr 2000 08:16:44 -0000 Received: (qmail 19130 invoked by alias); 5 Apr 2000 08:16:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10497 Received: (qmail 19123 invoked from network); 5 Apr 2000 08:16:31 -0000 Date: Wed, 5 Apr 2000 10:15:55 +0200 (MET DST) Message-Id: <200004050815.KAA01596@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Tue, 04 Apr 2000 20:31:37 +0100 Subject: Re: Still problems with scriptname (presumably) Peter Stephenson wrote: > Sven Wischnowsky wrote: > > Peter Stephenson wrote: > > > % zsh -c 'echo '\' this_is_not_the_command_name > > > this_is_not_the_command_name:-1: unmatched ' > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > this is the bit I object to, the error message is OK. > > > > But then I tried ksh and bash. ksh doesn't give me an error (?!?) and > > bash does the same as zsh currently does. > > You're right, and in fact I've known about this for ages and mentioned it > before and was just thinking about it today and the penny still didn't > drop... Bourne shell derivatives when they use -c set $0 to the first > argument. That needs to be kept. There's no reason for an option which > will just add to the confusion. You'll have noticed that my patch (still not committed) doesn't change $0, it just keeps that from being used as the `name' for printing errors and warnings. So... ;-) (I'd be in favour of using the patch, the current behaviour looks so weird.) Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de