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

Reply via email to