Move bash completion logic to new subcommand: rmi
@@ -2193,7 +2193,14 @@ _docker_image_remove() {
}
_docker_image_rm() {
- _docker_rmi
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W "--force -f --help --no-prune" -- "$cur" ) )
+ ;;
+ *)
+ __docker_complete_images
+ ;;
+ esac
}
_docker_image_rmi() {
@@ -3058,14 +3065,7 @@ _docker_rm() {
}
_docker_rmi() {
- case "$cur" in
- -*)
- COMPREPLY=( $( compgen -W "--force -f --help --no-prune" -- "$cur" ) )
- ;;
- *)
- __docker_complete_images
- ;;
- esac
+ _docker_image_rm
}
_docker_run() {
