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

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



On Mon, 26 Apr 2010 12:53:31 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> 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

That's a bug:  can you get it to happen with the new completion system (I
tried briefly and failed)?  I presume there's a gap in the suffix-fixing
logic for completion.

> or even better:
> 
>   my_echo true
>   my_echo false
> 
> i.e. the "&" should be ignored by insert-last-word.

That's not a bug.  As Mikael suggested, you need to use something that's
smart about syntax; that's not the job of insert-last-word, which only
knows about the division into editing words.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



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