cli
cli copied to clipboard
[WIP] Completion for events --filter
Adds completion for the docker events --filter
family.
@thaJeztah PTAL. This is in an early stage (only some filters implemented yet), and I would like to get early feedback whether I'm on the right track here.
For ContainerNames
and NetworkNames
I reuse existing completion functions in a hacky way.
I think we will hit more use cases like this, and a better solution would be appropriate.
Therefore I propose to pull out helper functions that just return the names (which I need here) from the existing helper functions.
Now I run into naming issues. Using the network example, the new function should be named NetworkNames
, which forces me to rename the existing one to something like CompleteNetworkNames
or NetworkNameCompletions
.
To stay consistent, this would mean other completion helpers should be renamed as well, e.g. EnvVarNames
-> CompleteEnvVarNames
and VolumeNames
-> CompleteVolumeNames
.
WDYT?