Mandeep Sandhu <mandeepsandhu.chd@...> writes:

> 
> 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

Mandeep, you were talking about the git alias, they have to be used as "git
gco" rather than "gco". But I was talking about the common issue that the
aliases in fish doesn't share with the same completion as the original command,
not just for git.

And in fish, even a simple alias as "alias l=ls", "l" won't have ls's
completion, this is really unintuitive.

In fish, the solution for the built in completions is, define a fucntion that
define complections for $cmds in __fish_complete_ls.fish, and for every built
in alias for "ls", like "ll", "la", define a ll.fish and la.fish inside
completion folder with content as simple as: "__fish_complete_ls ll" and
"__fish_complete_ls la". These are for the built ins, if we define another
alias for ls, say "alias l=ls", we have to define a completion file l.fish with
"__fish_complete_ls l". Every alias need a separate completion file. I think
this is really redundant, and against the design philosophy of fish.

And when comes to command supports subcommand like git, it gets even worse,
cause "alias gco=git checkout" is just a subcommand, shouldn't use the same
completion as git the whole command. That's another issue to solve.



------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&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