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

Re: compctl whitespace changes



Phil Pennock wrote:

> I just moved my private box from zsh-3.0.8 to zsh-4.0.2.
> 
> I have a function which takes the name of a mailbox as a parameter and
> starts mutt appropriately, and starts mutt in turn if more than one
> parameter is passed.
> 
> This:
>  compctl -g '~/Mail/Lists/*(D.:t)' lmutt
> is what I've been using.
> 
> Because I used to use 3.1.x I remembered -W, so this:
>  compctl -f -W ~/Mail/Lists lmutt
> works just fine.

Hrm.  That's because it can't recognise them as filenames (because of
that `:t').  I don't remember the reason for that change, though, having
not used compctl for quite some time.

> However, I was pushed into making the change because whereas before a
> space would be appended to successful solutions, with zsh 4 this is no
> longer the case.  The cursor is left immediately at the end of the
> completed word.
> 
> Is this deliberate?  How do I override it if there are other instances
> where it bites me and there's not a quick fix like this?


One could always add `-S " "' to get the space.

> Or should I just be moving to the compsys stuff?

Probably a good idea anyway.  Something like:

  compdef _lmutt lmutt
  _lmutt () { _files -W ~/bin -g '*(.)' }

could get you started.


Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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