-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zsh completion never suggests files but only options #886
Comments
Since you added a specific completion for
There's also the possibilty filtering by patterns: |
Thanks @rsteube, I was not aware that this had to be enabled manually. 👍 |
@rsteube can you show a small example on how to add them? I am trying and it doesn't seem to work for sub commands? |
There is a test using it: Line 164 in e2c45ac
You probably know, but if it's a sub command it needs to be called on the sub command and not on the root command. Can't think of any other reason right now why it's not working. |
I added it here: It doesn't seem to have any impact on what is output by running: ipsw completion zsh I would have expected to see "DeviceTree*" show up somewhere or 😕 |
I think it's because of the sub sub command "list": https://github.com/blacktop/ipsw/blob/9b307d745c4a7b27f8567d281c0fa7ce0169c600/cmd/ipsw/cmd/device_list.go#L15 That should set the list commond as positional argument 1 and thus override your file argument (both is probably not possible). When that is commented the Devicetree argument is rendered in the output. |
Ah thank you! I should simplify my sub sub subs into a more typical cli. I also confirmed if I remove the sub subs it does in fact work 👍 |
An overhauled zsh completion was merged with #646. One drawback of that script is that it only ever suggests options. Say for example, I have a command
cmd
with option--foo
. When I typeI would expect to see a suggestion list of all files in the working dir. However, it actually adds a
-
and shows the--foo
suggestion.It would be much better to trigger option completion only when typing
and otherwise show the standard list of files in the cwd.
/cc @rsteube @babysnakes
The text was updated successfully, but these errors were encountered: