Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
complete choices for a2enmod / a2dismod etc. #2141
i'm having trouble to get auto completion running for a2enmod, a2dismod, a2ensite and so on. with bash i can just type "a2enmod " and get a list of all available mods. is there a way to do this with fish as well? another problem i'm having is that i don't get proper suggestions for sudo. when i'm typing as my user "sudo a2e" I don't get any suggestions, but executing "sudo a2enmod" works just fine.
thank you very much in advance!
added a commit
Jun 26, 2015
I think the problem here is that because PATH is set as a local variable in the
I'm wondering if this got broken by the change to top-level scoping or something, although I doubt it.
This worked in 1.23.1 (!) but I think b0c6d89 broke it well before 2.0.0. I don't think the change is wrong; certainly it doesn't seem wise to alter the global PATH, but I'm not 100% sure that
@zanchey: As far as I understand, "--no-scope-shadowing" means that the calling "local" scope is inherited, right? __fish_complete_subcommand defines all variables it uses as local and __fish_complete_subcommand_root doesn't use any variables of the same name after the call (in fact it does nothing).
So I don't see any bugs popping up because of that change - though it'd mean we'd have to be careful. But given that the last change to __fish_complete_subcommand was in 2012, I think it's rather stable.
The other options I see are: