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

Re: zsh: insert-last-word problem after completion



On 26 April 2010 12:53, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> I've reported the following bug in Debian. It also occurs
> under Mac OS X.
>
> After a "zsh -f":
>
> % alias my_echo=echo
> % false
> % true &
> % my_ech[TAB]
>
> A succession of [ESC] . (bound to insert-last-word) gives:
>
>  my_echo&
>  my_echo&&
>  my_echo&false
>
> while I would expect:
>
>  my_echo &
>  my_echo false
>
> or even better:
>
>  my_echo true
>  my_echo false
>
> i.e. the "&" should be ignored by insert-last-word.

Maybe you want smart-insert-last-word?

              Otherwise,  the  rightmost ``interesting'' word from the
previous com-
              mand is found and inserted.  The default definition of
``interesting''
              is that the word contains at least one alphabetic
character, slash, or
              backslash.  This definition may be overridden  by  use
of  the  match
              style.

-- 
Mikael Magnusson



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