|
@@ -474,6 +474,26 @@ __docker_complete_events_filter() {
|
|
|
return ret
|
|
|
}
|
|
|
|
|
|
+__docker_complete_prune_filters() {
|
|
|
+ [[ $PREFIX = -* ]] && return 1
|
|
|
+ integer ret=1
|
|
|
+ declare -a opts
|
|
|
+
|
|
|
+ opts=('until')
|
|
|
+
|
|
|
+ if compset -P '*='; then
|
|
|
+ case "${${words[-1]%=*}#*=}" in
|
|
|
+ *)
|
|
|
+ _message 'value' && ret=0
|
|
|
+ ;;
|
|
|
+ esac
|
|
|
+ else
|
|
|
+ _describe -t filter-opts "filter options" opts -qS "=" && ret=0
|
|
|
+ fi
|
|
|
+
|
|
|
+ return ret
|
|
|
+}
|
|
|
+
|
|
|
# BO container
|
|
|
|
|
|
__docker_container_commands() {
|
|
@@ -541,6 +561,7 @@ __docker_container_subcommand() {
|
|
|
"($help)*--group=[Set one or more supplementary user groups for the container]:group:_groups"
|
|
|
"($help -h --hostname)"{-h=,--hostname=}"[Container host name]:hostname:_hosts"
|
|
|
"($help -i --interactive)"{-i,--interactive}"[Keep stdin open even if not attached]"
|
|
|
+ "($help)--init[Run an init inside the container that forwards signals and reaps processes]"
|
|
|
"($help)--ip=[Container IPv4 address]:IPv4: "
|
|
|
"($help)--ip6=[Container IPv6 address]:IPv6: "
|
|
|
"($help)--ipc=[IPC namespace to use]:IPC namespace: "
|
|
@@ -731,6 +752,7 @@ __docker_container_subcommand() {
|
|
|
(prune)
|
|
|
_arguments $(__docker_arguments) \
|
|
|
$opts_help \
|
|
|
+ "($help)*--filter=[Filter values]:filter:__docker_complete_prune_filters" \
|
|
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
|
|
;;
|
|
|
(rename)
|
|
@@ -977,6 +999,7 @@ __docker_image_subcommand() {
|
|
|
_arguments $(__docker_arguments) \
|
|
|
$opts_help \
|
|
|
"($help -a --all)"{-a,--all}"[Remove all unused images, not just dangling ones]" \
|
|
|
+ "($help)*--filter=[Filter values]:filter:__docker_complete_prune_filters" \
|
|
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
|
|
;;
|
|
|
(pull)
|
|
@@ -1204,6 +1227,7 @@ __docker_network_subcommand() {
|
|
|
(prune)
|
|
|
_arguments $(__docker_arguments) \
|
|
|
$opts_help \
|
|
|
+ "($help)*--filter=[Filter values]:filter:__docker_complete_prune_filters" \
|
|
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
|
|
;;
|
|
|
(rm)
|
|
@@ -1497,9 +1521,15 @@ __docker_plugin_subcommand() {
|
|
|
opts_help=("(: -)--help[Print usage]")
|
|
|
|
|
|
case "$words[1]" in
|
|
|
- (disable|enable|inspect|install|ls|push|rm)
|
|
|
+ (disable|enable|inspect|ls|push|rm)
|
|
|
+ _arguments $(__docker_arguments) \
|
|
|
+ $opts_help \
|
|
|
+ "($help -)1:plugin:__docker_complete_plugins" && ret=0
|
|
|
+ ;;
|
|
|
+ (install)
|
|
|
_arguments $(__docker_arguments) \
|
|
|
$opts_help \
|
|
|
+ "($help)--alias=[Local name for plugin]:alias: " \
|
|
|
"($help -)1:plugin:__docker_complete_plugins" && ret=0
|
|
|
;;
|
|
|
(set)
|
|
@@ -1588,7 +1618,7 @@ __docker_secret_subcommand() {
|
|
|
|
|
|
case "$words[1]" in
|
|
|
(create)
|
|
|
- _arguments $(__docker_arguments) \
|
|
|
+ _arguments $(__docker_arguments) -A '-*' \
|
|
|
$opts_help \
|
|
|
"($help)*"{-l=,--label=}"[Secret labels]:label: " \
|
|
|
"($help -):secret: " && ret=0
|
|
@@ -2060,9 +2090,10 @@ __docker_swarm_subcommand() {
|
|
|
"($help)--task-history-limit=[Task history retention limit]:limit: " && ret=0
|
|
|
;;
|
|
|
(join)
|
|
|
- _arguments $(__docker_arguments) \
|
|
|
+ _arguments $(__docker_arguments) -A '-*' \
|
|
|
$opts_help \
|
|
|
- "($help)--advertise-addr[Advertised address]:ip\:port: " \
|
|
|
+ "($help)--advertise-addr=[Advertised address]:ip\:port: " \
|
|
|
+ "($help)--availability=[Availability of the node]:availability:(active drain pause)" \
|
|
|
"($help)--listen-addr=[Listen address]:ip\:port: " \
|
|
|
"($help)--token=[Token for entry into the swarm]:secret: " \
|
|
|
"($help -):host\:port: " && ret=0
|
|
@@ -2142,6 +2173,7 @@ __docker_system_subcommand() {
|
|
|
_arguments $(__docker_arguments) \
|
|
|
$opts_help \
|
|
|
"($help -a --all)"{-a,--all}"[Remove all unused data, not just dangling ones]" \
|
|
|
+ "($help)*--filter=[Filter values]:filter:__docker_complete_prune_filters" \
|
|
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
|
|
;;
|
|
|
(help)
|
|
@@ -2370,6 +2402,7 @@ __docker_subcommand() {
|
|
|
"($help -g --graph)"{-g=,--graph=}"[Root of the Docker runtime]:path:_directories" \
|
|
|
"($help -H --host)"{-H=,--host=}"[tcp://host:port to bind/connect to]:host: " \
|
|
|
"($help)--icc[Enable inter-container communication]" \
|
|
|
+ "($help)--init[Run an init inside containers to forward signals and reap processes]" \
|
|
|
"($help)--init-path=[Path to the docker-init binary]:docker-init binary:_files" \
|
|
|
"($help)*--insecure-registry=[Enable insecure registry communication]:registry: " \
|
|
|
"($help)--ip=[Default IP when binding container ports]" \
|
|
@@ -2492,14 +2525,14 @@ __docker_subcommand() {
|
|
|
esac
|
|
|
;;
|
|
|
(login)
|
|
|
- _arguments $(__docker_arguments) \
|
|
|
+ _arguments $(__docker_arguments) -A '-*' \
|
|
|
$opts_help \
|
|
|
"($help -p --password)"{-p=,--password=}"[Password]:password: " \
|
|
|
"($help -u --user)"{-u=,--user=}"[Username]:username: " \
|
|
|
"($help -)1:server: " && ret=0
|
|
|
;;
|
|
|
(logout)
|
|
|
- _arguments $(__docker_arguments) \
|
|
|
+ _arguments $(__docker_arguments) -A '-*' \
|
|
|
$opts_help \
|
|
|
"($help -)1:server: " && ret=0
|
|
|
;;
|
|
@@ -2563,7 +2596,7 @@ __docker_subcommand() {
|
|
|
__docker_image_subcommand && ret=0
|
|
|
;;
|
|
|
(search)
|
|
|
- _arguments $(__docker_arguments) \
|
|
|
+ _arguments $(__docker_arguments) -A '-*' \
|
|
|
$opts_help \
|
|
|
"($help)*"{-f=,--filter=}"[Filter values]:filter:->filter-options" \
|
|
|
"($help)--limit=[Maximum returned search results]:limit:(1 5 10 25 50)" \
|