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 completions #11
Comments
I can imagine a CLI option such as |
Or |
@alloy currently we don't have support for options arguments... correct? |
I like the idea of the option but I think that it should be hidden... no? An why a flag instead of a proper sub command? |
Yeah we do, see https://github.com/CocoaPods/CLAide/blob/master/examples/argv.rb#L12
Yeah it would not be exposed in any help banners. Indeed, a hidden command might be more appropriate. |
I think the shell agnostic approach is definitely the better one there. The generation could also default to the current $SHELL |
As long as those arguments could be automated out by subcommand I don't think it would be that bad to automate. |
Very good point!
A command is only ever available on one nesting level… which now makes me think that a command wouldn’t work, as a program might define an arbitrary level of subclasses of the main |
(Where those “subclasses” would be abstract commands, so not visible/callable.) |
In the case of CocoaPods the commands each seem to inherit from the |
In CocoaPods, we define one base class, which is the one you mean by So in this scenario, defining a default command such as |
Right that does make that more complicated. The easy option here is for me to simply write the file for CocoaPods 😜 |
The easy option would be to just use an option for now as per my original reply :D |
But which subclasses would you pull from? |
What you do is that you start at the root class |
And you're thinking we should add this functionality to CLAide itself? |
This comment is outside the scope of this issue but default commands should be available in CLAide (for example |
Aye. It would be equally helpful to others, e.g. RubyMotion. |
The |
From a quick check it looks that many commands accept both variants. However I can live with them as option... now that I recall my issue was with not having |
Bower implementation: http://bower.io/#completion-experimental |
From this recommendation it would be nice, probably even possible, to setup some generation for CocoaPods zsh completions. Here is the homebrew completion library, as you can see you can do pretty much anything in them, including piping output from other commands to the completion list.
I would gladly write this setup. I think that it could be built dynamically at least to the extent of the commands and flags assuming we could track those down somewhere. The homebrew completion also completes things like
brew install gi<tab>
by searching all formula to this:Although I'm not sure I can think of a place for this.
The text was updated successfully, but these errors were encountered: