Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Still problems with scriptname (presumably)
- X-seq: zsh-workers 10531
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Still problems with scriptname (presumably)
- Date: Thu, 6 Apr 2000 10:26:33 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Wed, 05 Apr 2000 20:21:08 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> Sven Wischnowsky wrote:
> > 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.)
>
> Aha. Confusion is a wonderful thing. Yes, as far as internal management
> of names goes that would be fine. It's explicitly separate from argzero
> anyway, because of the [no]functionargzero bodge, and I've taken to using
> `print -P %N' to get function names in messages, so your patch would seem
> to be a sensible way forward.
Well then...
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/06 08:26:07
@@ -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