mirror of https://github.com/docker/cli.git
Add zsh completion for new prune commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
9af599ffc5
commit
f2e2ba5d43
|
@ -729,7 +729,9 @@ __docker_container_subcommand() {
|
||||||
"($help -)2:port:_ports" && ret=0
|
"($help -)2:port:_ports" && ret=0
|
||||||
;;
|
;;
|
||||||
(prune)
|
(prune)
|
||||||
# @TODO
|
_arguments $(__docker_arguments) \
|
||||||
|
$opts_help \
|
||||||
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
||||||
;;
|
;;
|
||||||
(rename)
|
(rename)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -970,7 +972,10 @@ __docker_image_subcommand() {
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(prune)
|
(prune)
|
||||||
# @TODO
|
_arguments $(__docker_arguments) \
|
||||||
|
$opts_help \
|
||||||
|
"($help -a --all)"{-a,--all}"[Remove all unused images, not just dangling ones]" \
|
||||||
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
||||||
;;
|
;;
|
||||||
(pull)
|
(pull)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -1115,6 +1120,7 @@ __docker_network_commands() {
|
||||||
"disconnect:Disconnects a container from a network"
|
"disconnect:Disconnects a container from a network"
|
||||||
"inspect:Displays detailed information on a network"
|
"inspect:Displays detailed information on a network"
|
||||||
"ls:Lists all the networks created by the user"
|
"ls:Lists all the networks created by the user"
|
||||||
|
"prune:Remove all unused networks"
|
||||||
"rm:Deletes one or more networks"
|
"rm:Deletes one or more networks"
|
||||||
)
|
)
|
||||||
_describe -t docker-network-commands "docker network command" _docker_network_subcommands
|
_describe -t docker-network-commands "docker network command" _docker_network_subcommands
|
||||||
|
@ -1190,6 +1196,11 @@ __docker_network_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
(prune)
|
||||||
|
_arguments $(__docker_arguments) \
|
||||||
|
$opts_help \
|
||||||
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
||||||
|
;;
|
||||||
(rm)
|
(rm)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -1863,7 +1874,10 @@ __docker_system_subcommand() {
|
||||||
"($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " && ret=0
|
"($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " && ret=0
|
||||||
;;
|
;;
|
||||||
(prune)
|
(prune)
|
||||||
# @TODO
|
_arguments $(__docker_arguments) \
|
||||||
|
$opts_help \
|
||||||
|
"($help -a --all)"{-a,--all}"[Remove all unused data, not just dangling ones]" \
|
||||||
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
||||||
;;
|
;;
|
||||||
(help)
|
(help)
|
||||||
_arguments $(__docker_arguments) ":subcommand:__docker_volume_commands" && ret=0
|
_arguments $(__docker_arguments) ":subcommand:__docker_volume_commands" && ret=0
|
||||||
|
@ -1943,6 +1957,7 @@ __docker_volume_commands() {
|
||||||
"create:Create a volume"
|
"create:Create a volume"
|
||||||
"inspect:Display detailed information on one or more volumes"
|
"inspect:Display detailed information on one or more volumes"
|
||||||
"ls:List volumes"
|
"ls:List volumes"
|
||||||
|
"prune:Remove all unused volumes"
|
||||||
"rm:Remove one or more volumes"
|
"rm:Remove one or more volumes"
|
||||||
)
|
)
|
||||||
_describe -t docker-volume-commands "docker volume command" _docker_volume_subcommands
|
_describe -t docker-volume-commands "docker volume command" _docker_volume_subcommands
|
||||||
|
@ -1982,6 +1997,11 @@ __docker_volume_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
(prune)
|
||||||
|
_arguments $(__docker_arguments) \
|
||||||
|
$opts_help \
|
||||||
|
"($help -f --force)"{-f,--force}"[Do not prompt for confirmation]" && ret=0
|
||||||
|
;;
|
||||||
(rm)
|
(rm)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
|
|
@ -21,7 +21,7 @@ Usage: docker system prune [OPTIONS]
|
||||||
Delete unused data
|
Delete unused data
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-a, --all Remove all unused images not just dangling ones
|
-a, --all Remove all unused data not just dangling ones
|
||||||
-f, --force Do not prompt for confirmation
|
-f, --force Do not prompt for confirmation
|
||||||
--help Print usage
|
--help Print usage
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue