From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10694 invoked from network); 4 Apr 2000 19:33:49 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Apr 2000 19:33:49 -0000 Received: (qmail 21267 invoked by alias); 4 Apr 2000 19:31:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10481 Received: (qmail 21234 invoked from network); 4 Apr 2000 19:31:41 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: Still problems with scriptname (presumably) In-reply-to: "Sven Wischnowsky"'s message of "Tue, 04 Apr 2000 14:16:11 +0200." <200004041216.OAA13494@beta.informatik.hu-berlin.de> Date: Tue, 04 Apr 2000 20:31:37 +0100 From: Peter Stephenson Message-Id: 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. I actually saw something like this somewhere else, where my $PS1 turned up in an error message, and I can't remember where it was so I don't know if that was a real bug. -- Peter Stephenson Work: pws@CambridgeSiliconRadio.com Web: http://www.pwstephenson.fsnet.co.uk