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 committed by Tibor Vass
parent 8dd6f6d342
commit 1c56dfab6f
1 changed files with 5 additions and 1 deletions

View File

@ -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
} }