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

Shell-word splitting (was: Re: Proposed _history completer)



Bart Schaefer wrote:

> On Apr 28,  9:20am, Sven Wischnowsky wrote:
> }
> } Bart Schaefer wrote:
> } 
> } > I think having a way to chop a string into shell words -- something like
> } > what you did for copy-prev-shell-word -- would be more effective.
> } 
> } [...] some parameter flag, most likely. Hm, s and S are taken,
> } so are c and C. We could use `=' but that would probably be too
> } irritating.
> 
> Hrm.  How would a parameter flag do this on an array?  Parse each word
> separately?

I wrote this at the weekend (quite simple) and, yes, it just split the 
array's elements separately and then returned an array with all words
from all elements.

> Hrm, again; maybe the way to do this is with a modifier rather than a
> flag.  :S is available, and it'd be kinda fun to be able to apply this
> to history as well as to parameters.  Or maybe it wouldn't ...

I'm withholding the patch I have because of this. I'll check how
difficult this is to implement, but I guess it's equally simple.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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