Hi Ville, On Thu, May 31, 2012 at 9:24 PM, Ville Skyttä <ville.sky...@iki.fi> wrote: > On 2012-05-31 20:25, suvayu ali wrote: > >> $ function find_ext() { echo "dummy wrapper fn for find"; } >> $ complete -F _find find_ext > [...] >> So my question is, how do you enable completion for my wrappers such >> that it works even when I try it for the first time? > > I'd look into loading needed functions on demand using _xfunc - that's > how interdependent snippets shipped with bash-completion itself do it. > For example: > > $ find_ext() { echo "dummy wrapper fn for find"; } > $ _find_ext() { _xfunc find _find; } > $ complete -F _find_ext find_ext > $ find_ext -t<TAB> > -true -type
Thanks a lot for this solution. In the mean time I came up with my own wrapper for _completion_loader[1] but your solution is much simpler. Thanks a lot. :) Footnotes: [1] <http://lists.fedoraproject.org/pipermail/users/2012-May/418944.html> -- Suvayu Open source is the future. It sets us free. _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel