Re: [Fish-users] autocomplete "alias" from another command's autocomplete
Well, we are in the process of moving many completions to functions, the reason being exactly what you wish for. Check out pacman.fish, it merely contains a call to the function __fish_complete_pacman with "pacman" as argument. If you use an alias for pacman, say "pm", all you need to do is create a copy of pacman.fish as pm.fish, edit it like this: __fish_complete_pacman pm and presto, pm has the same completions as pacman. On Fri, Nov 30, 2012 at 6:04 PM, Leonardo Boiko wrote: > Still, extending completion to aliases would be a cool feature for fish to > have. > > On 30 November 2012 14:09, Jakub Arnold wrote: >> Say that I have defined a simpe "alias" as a function >> >> function gco >> git checkout $argv >> end >> >> and I want to provide the same autocomplete that `git checkout` would have. >> Is it possible to do that in a simple way? -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] autocomplete "alias" from another command's autocomplete
Still, extending completion to aliases would be a cool feature for fish to have. On 30 November 2012 14:09, Jakub Arnold wrote: > Say that I have defined a simpe "alias" as a function > > function gco > git checkout $argv > end > > and I want to provide the same autocomplete that `git checkout` would have. > Is it possible to do that in a simple way? > > -- > Keep yourself connected to Go Parallel: > TUNE You got it built. Now make it sing. Tune shows you how. > http://goparallel.sourceforge.net > ___ > Fish-users mailing list > Fish-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fish-users > -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] autocomplete "alias" from another command's autocomplete
Git has that functionality built in, see https://git.wiki.kernel.org/index.php/Aliases git config --global alias.ci commit On 30/11/2012 16:09, Jakub Arnold wrote: Say that I have defined a simpe "alias" as a function function gco git checkout $argv end and I want to provide the same autocomplete that `git checkout` would have. Is it possible to do that in a simple way? -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users