-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
Thanks for the contribution! The output looks a little odd. For example, there is |
Yeah definitely think the [] and other bits are artifacts from the flags array. I'll scale it back to commands initially and move the script to a contrib directory. Testing should be really easy then, just need to compare the output from the --enable-bash-completion with the commands array. |
hey @booyaa - you'll need to sign your commits and re-push for the build to pass |
heya @hairyhenderson i'm probably going to rollback the changes to commands/commands.go to the commit before mine. what's the prefer way to sync my changes? close and raise new pr, or just push updates back to master? |
Signed-off-by: Mark Sta Ana <booyaabooyaabooyaa@gmail.com>
last known commit. Signed-off-by: Mark Sta Ana <booyaabooyaabooyaa@gmail.com>
… add_shell_completion
We've merged in #1993 so I'm going to close this. |
This is my attempt to implement #1308.
Out of the box codegangsta's cli package supports command completion, but not flags (global or command specific) there's a pending enhancement request urfave/cli#188. So I've decided to implement this and maybe give back to the cli package too!
I've been playing around with the config and create commands.
So far I've been unable to access the Flags of commands. I can display the global flags (in app.Flags), but this also has the undesired effect of display aliases and (I think) descriptions of the flags.
I've added the stock shell completion script in the script folder, but whilst writing the issue #1308 I discovered the completion scripts in docker and compose live in a contrib folder, so I'll move it there.
Usage of the completion script is as follows:
The script can be tailored to predefine PROG as
docker-machine
Finally any suggestions on any part of this PR (in particular testing) are appreciated. I'm still fairly new to Go, but always willing to learn.