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

Re: two new key commands for 3.0.4



Ingo Wilken <Ingo.Wilken@xxxxxxxxxxxxxxxxxxxxxxxxxxx> typed:
:The first is almost the same as the copy-prev-word command, except that
:it should ignore the word the cursor is in or adjacent to:
:    Case 1:  ~> echo foo bar []
:    Case 2:  ~> echo foo bar[]
:    Case 3:  ~> echo foo b[a]r
:[] ist the cursor.  copy-prev-word copies "bar" in case 1 and 2, and a "b"
:in case 3.  I wanted a command that copies "bar" in case 1, and "foo" in
:case 2 and 3.  I could not think of a better name, so I called it
:copy-prev-word-skip for now.
:
:The second copies all arguments from the previous command, similar to
:insert-last-word, but it should always copy _all_ words except the first.
:I called it insert-last-args.  As with insert-last-word, using this
:command repeatedly cycles through the history.

I don't think we really need to `bloat' zsh with almost-the-same functions,
especially with 3.0.* being the `stable branch' with only bug-fixes now.
I'm sure you could do both with  zle  and  bindkey  in 3.1.2-beta
-- 
Geoff Wing [mason@xxxxxxxxxxxxxxx]   Technical Manager
  Phone    : +61-3-9818 2977         PrimeNet - Internet Consultancy
  Facsimile: +61-3-9819 3788         Web : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441



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