Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
`complete -C` fails on subcommands #4093
Comments
krader1961
added
the
question
label
Jun 4, 2017
|
Not so much a bug but a fundamental limitation. The first thing to note is that fish has no way to know that |
|
Anyways, I've looked up the functions manually. I'm trying to replace the fish completion menu with fzf using the code there: https://github.com/junegunn/fzf/wiki/Examples-(fish) (Completion). Is there any workaround? Generally speaking, it would be great if |
|
Completions aren't loaded until you try to use the command in the current shell. They're like autoloaded functions in that regard. So The current solution for nested commands is a bit of a hack. I hate to say never but it is improbable the current solution will ever be improved as it would be adding a hack on top of a hack. You could certainly open an enhancement request that the core completion logic include support for nested commands. But I wouldn't hold my breath waiting for it to be implemented. Since in practice there are only a handful of commands commonly used which have this pattern ( |
|
Too bad. I'll see if I can work around this gracefully though. |
krader1961
closed this
Jun 6, 2017
|
I've commited the following change: That seems to work well for the case of |
Ambrevar commentedJun 3, 2017
fish, version 2.5.0-430-g5e39efa4
OS: Arch Linux
Terminal: Urxvt 9.22
Works as expected:
Outputs nothing:
Am I hitting a bug?