mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Improve bash completion for docker rm
`docker rm` can delete containers in state=created, too. Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
f148ad38e5
commit
cac3775de8
1 changed files with 5 additions and 1 deletions
|
@ -101,6 +101,10 @@ __docker_complete_containers_all() {
|
||||||
__docker_complete_containers "$@" --all
|
__docker_complete_containers "$@" --all
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__docker_complete_containers_removable() {
|
||||||
|
__docker_complete_containers "$@" --filter status=created --filter status=exited
|
||||||
|
}
|
||||||
|
|
||||||
__docker_complete_containers_running() {
|
__docker_complete_containers_running() {
|
||||||
__docker_complete_containers "$@" --filter status=running
|
__docker_complete_containers "$@" --filter status=running
|
||||||
}
|
}
|
||||||
|
@ -1430,7 +1434,7 @@ _docker_container_rm() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
__docker_complete_containers_stopped
|
__docker_complete_containers_removable
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue