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

Re: default completion function



that worked very nice, thank you!

2018-03-11 19:20 GMT+01:00 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:

> On Mar 7,  1:52pm, Peter Stephenson wrote:
> } Subject: Re: default completion function
> }
> } On Wed, 7 Mar 2018 13:28:38 +0100
> } Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
> } > How can I set a default like that without overwriting existing more
> } > specific completion?
> }
> } The obvious way (so probably this is too simple) is to override the
> } function _default, the normal version of which you'll find in your
> } $fpath.  As long as your function starts with "#compdef -default-" and
> } is earlier in your $fpath it should be used in preference.
>
> I wouldn't recommend that.  The _gnu_generic function falls back on
> _default so this potentially creates infinite recursion.
>
> Much better:  compdef _gnu_generic -default-
>



-- 
Pier Paolo Grassi
email: pierpaolog@xxxxxxxxx
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
fondatore: https://www.meetup.com/it-IT/Machine-Learning-TO


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