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

Re: default completion function



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-



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