Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Still problems with scriptname (presumably)
- X-seq: zsh-workers 10464
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Still problems with scriptname (presumably)
- Date: Tue, 4 Apr 2000 14:16:11 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Mon, 03 Apr 2000 21:32:35 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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.
Note: no `PATCH:' in the subject...
I was about to send/commit the patch below (which is kinda brute
force, setting scriptname to zsh when there is a -c option on the
command line).
But then I tried ksh and bash. ksh doesn't give me an error (?!?) and
bash does the same as zsh currently does.
I don't need to say that compatibility to bash doesn't interest me, do I?
So, should I commit the change?
Bye
Sven
Index: Src/init.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/init.c,v
retrieving revision 1.1.1.51
diff -u -r1.1.1.51 init.c
--- Src/init.c 2000/03/23 04:22:57 1.1.1.51
+++ Src/init.c 2000/04/04 12:09:26
@@ -222,6 +222,7 @@
cmd = *argv;
opts[INTERACTIVE] &= 1;
opts[SHINSTDIN] = 0;
+ scriptname = ztrdup("zsh");
} else if (**argv == 'o') {
if (!*++*argv)
argv++;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author