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


Peter Stephenson wrote:

> I've had this sort of worry, too.  Maybe there's room for defining new
> flags for commands, telling it (say) whether to use space-separated words
> instead of WORDCHARS-defined words, which might be handled by some sleight
> of hand in the macro used in zle_word, i.e. instead of testing iword() we
> test !inblank() (we're approaching the limits of type flags possible with a
> short if we need more).  The syntax might be that you defined a new widget
> using `zle', but in a way that made it use an existing builtin function
> just with those extra flags.  That would reduce the hassle to one zle and
> one bindkey command.  I think this could even be done quite easily with zle
> -A, where you allowed the thingy to store ZLE_* flags and used the
> appropriate part of the set to override the ones in the widget (non-zle
> hackers are not expected to understand that sentence).

The more I read about this the more I think that we should just go
ahead and allow all zle widget functions to get (an arbitrary number
of) arguments (strings). If no arguments are given, the function uses
its defaults. We could than probably have a couple of generic
functions (e.g. for word movement) and define aliases to them with
fixed arguments (as Peter suggested with flags), probably even for
some of the functions that are currently real builtin widgets.

I mean, we were talking about allowing arguments for the search-
functions anyway, so why not use it it many more places.


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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