From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4128 invoked from network); 14 Jun 1999 15:11:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Jun 1999 15:11:51 -0000 Received: (qmail 13969 invoked by alias); 14 Jun 1999 15:11:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6621 Received: (qmail 13927 invoked from network); 14 Jun 1999 15:11:12 -0000 Message-Id: <9906141442.AA40274@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: WORDCHARS, etc. In-Reply-To: "Sven Wischnowsky"'s message of "Mon, 14 Jun 1999 11:19:18 DFT." <199906140919.LAA28474@beta.informatik.hu-berlin.de> Date: Mon, 14 Jun 1999 16:42:29 +0200 From: Peter Stephenson Sven Wischnowsky wrote: > I've prepared a patch for this argument-passing thing, too. I haven't > tried, but I'm sure this will clash with Peter's patch. So I'll just > explain what it does and append it below if some of you want to try > it. Those parts that are considered good things can then be merged > with Peter's. I'd better leave both of these out of pws-22 and we can decide later. No doubt Bart will have impartial views. > - The zle functions (the C-functions) have been changed to get an > `char **args' argument and to return an integer. The return value is > currently only used to signal some kind of error condition. Of > course, it is also returned when invokiing widgets via `zle'. This is more far-reaching than mine. > - I've taken {vi-,}history-search-{for,back}ward as examples that use > the arguments -- they all accept one string which is then searched. I just made it put the string given in the buffer, but your idea is probably more useful, since mine doesn't lend itself to subsequent programming. > - The read builtin uses `getkey()' when called from a zle widget and > when reading from stdin. is that when (called from a zle widget && reading from stdin)? in which case that's a good idea. > - Another option for `zle': -R makes the command line be re-displayed. > It gets an optional argument: a string to display in the status > line. This is useful > - Finally, my suggestion for enhancing aliases. I've used a different > option character for this and because I couldn't think of a good > one, I've just taken `X': > > zle -X new-name old-name numeric args... I'm not sure we need both this and zle -A. And having this the other way round from zls -A is just creating more confusion, even if the -A choice was non-optimal (though it is in the UNIX tradition of things like mv and ln; if -L hadn't been used it would have been more obvious). There was some opposition to enhancing aliases anyway, since you can always define a function widget. One reason why I like them is it raises the possibility of having builtin widgets implemented as aliases at shell startup, which is a non-starter if you need a function. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy