Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Still problems with scriptname (presumably)



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 <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxxxxxxxxxxxxxxxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk



Messages sorted by: Reverse Date, Date, Thread, Author