-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add zsh completion for log options #17334
Conversation
@sdurrheimer |
Hm, I'll have to check as well. I wonder if we should just "assume" a driver supports all non-namespaced options (I.e. the options that are not prefixed with the driver-name), and make it a responsibility of the user to read the docs to check if the driver supports the flag (if a driver doesn't support it, will it silently be ignored). I can imagine all these options are a nightmare to maintain in the completions |
427cb2e
to
4f0f5e8
Compare
let's assume that in the completion, it will make our lives much easier. |
Do we agree on making |
@sdurrheimer sgtm, I think that'd make it a lot easier to maintain |
@sdurrheimer @thaJeztah It really depends if those flags are ignored or if they make the command fail 😅 . |
In bash completion, these options are not global: https://github.com/docker/docker/blob/master/contrib/completion/bash/docker#L331-L337. This makes me wonder whether both completions have to behave identically here. IMHO, not necessarily. For bash, I think we should keep the working solution. For zsh, a pragmatic approach with global options might be good enough. |
Thanks for your input @albers, yes ideally, the options should match the actual situation, but I can live with doing it on a "best effort" base, and defining them globally |
@thaJeztah The current version is without global_options, similar to what @albers has done with bash. (I need to rebase before merge) |
@sdurrheimer I'm good with the current approach (it's the "better" solution, albeit more demanding on maintenance), we can move to global options if it becomes to hard to maintain (just my 0.02c) |
4f0f5e8
to
dff6d63
Compare
Ok rebased. @vincentbernat for review. |
Wouldn't it be easy to move the whole |
dff6d63
to
6618710
Compare
I've done a little refactoring. |
LGTM |
c346f1f
to
4862fa8
Compare
|
LGTM 🐮 |
Good to me |
4862fa8
to
75470b3
Compare
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
75470b3
to
76fe00c
Compare
LGTM |
Add zsh completion for log options
LXC support has been deprecated and the related completion has been removed in moby#17700 but was added back in moby#17334. Signed-off-by: Vincent Bernat <vincent@bernat.im>
Add completion for log options.
But I have a question, are
env
,labels
andtag
available for all log drivers or only for a few ? It's a little bit hard to understand in log driver docs.@vincentbernat
Signed-off-by: Steve Durrheimer s.durrheimer@gmail.com