1
0
Fork 0
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:
Harald Albers 2017-03-17 09:21:21 +01:00
parent f148ad38e5
commit cac3775de8

View file

@ -101,6 +101,10 @@ __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 "$@" --filter status=running
}
@ -1430,7 +1434,7 @@ _docker_container_rm() {
;;
esac
done
__docker_complete_containers_stopped
__docker_complete_containers_removable
;;
esac
}