mirror of https://github.com/docker/cli.git
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
8dd6f6d342
commit
1c56dfab6f
|
@ -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 New Issue