mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Extended containers list with quited containers for __rm command
This commit is contained in:
parent
4d3122b2a7
commit
82aab6bf51
1 changed files with 8 additions and 1 deletions
|
|
@ -14,6 +14,13 @@ __docker_containers() {
|
|||
_describe 'containers' cont_cmd
|
||||
}
|
||||
|
||||
# Output a list of all containers (both running and stopped)
|
||||
__docker_containers_all() {
|
||||
declare -a cont_cmd
|
||||
cont_cmd=($(docker ps -a | awk 'NR>1{print $1":[CON("$1")"$2"("$3")]"}'))
|
||||
_describe 'containers' cont_cmd
|
||||
}
|
||||
|
||||
# output a selectable list of all docker images
|
||||
__docker_images() {
|
||||
declare -a img_cmd
|
||||
|
|
@ -169,7 +176,7 @@ __rm() {
|
|||
'(-f,--force=)'{-f,--force=}'[Force removal of running container]' \
|
||||
'(-l,--link=)'{-l,--link=}'[Remove the specified link and not the underlying container]' \
|
||||
'(-v,--volumes=)'{-v,--volumes=}'[Remove the volumes associated to the container]'
|
||||
__docker_containers
|
||||
__docker_containers_all
|
||||
}
|
||||
|
||||
__rmi() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue