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

Re: (backward-)kill-argument -- reformulation of the problem

John Beppu <beppu@xxxxxxx> writes:

> > i want to: * kill filenames w/ spaces: e.g.  this\ is\ file.txt
>     rm *[\ ]*

Hi John,

i feel very sorry, that i expressed myself very bad. My problem is
completely different from what i, unfortunately, described, and you answered.

I don't want to operate on my filesystem. I want to have a command in the ZLE
(Zsh' interactive line editor), which resembles backward-kill-word, but kills a whole
argument.  So imagine, i write ( _ is the cursor position):

$ cat this\ is\ file.txt_
and now i want:
$ cat just\ another\ document.html

Currently i have to backward-kill-word 3 times (and write the new argument).

> >   * maybe even the bracketed part: find { -name '*.h' }

Here i assume, that Zsh (in its completion system) "knows" that -name option of
find(1) takes 1 argument. So i could delete all this constraint.
In other words, from   (and the cursor could be under the text "-name '*.h'")
$  find  -name '*.h'_
i want to obtain 
$  find

If i was writing it in lisp/scheme, i could be typing
$ (find  (-name '*.h') ....)

and just delete the inner-most sexp.


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