I think the reason completion is not working is because of this line in share/completions/git.fish:
function __fish_git_using_command ... # aliased command set -l aliased (command git config --get "alias.$cmd[2]" ^ /dev/null | sed 's/ .*$//') ... So this is basically looking for aliases created via git itself ('git config alias.gco checkout' etc). To fix your issue, you either need to define an alias with git, or modify the __fish_git_using_command function to check if the given command is a shell alias and return 0. HTH, -mandeep On Tue, Nov 12, 2013 at 1:51 AM, Leira Hua <leira...@gmail.com> wrote: > I used to use some git aliases in zsh like this one: > > alias gco='git checkout'. > > I just switched to fish, and ported the these aliases to fish. Then I found a > completion issue, maybe caused by the reason that fish doesn't support "real" > alias. Here is my understanding: > > In zsh, it knows gco is simply an alias to git, when using tab to complete, it > will use git's completion. > > While in fish, gco becomes a function, and for a function, it expect a totally > different completion rather than git itself, so it lost the completion of git, > and we might have to redefine the completion for gco function. > > I do love fish's philosophy of orthogonality, and unify alias and function is > also a good idea. I'm not familiar with the completion system of fish yet, > but > I think there might be some trick in alias function can be done, that "assign" > the completion of the aliased command to the alias function, then solve this > problem once and for all. Is it possible yet? > > Thanks, Leira Hua > > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > Fish-users mailing list > Fish-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fish-users ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users