Move bash completion logic to new subcommand: save
@@ -2208,7 +2208,21 @@ _docker_image_rmi() {
}
_docker_image_save() {
- _docker_save
+ case "$prev" in
+ --output|-o)
+ _filedir
+ return
+ ;;
+ esac
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W "--help --output -o" -- "$cur" ) )
+ ;;
+ *)
+ __docker_complete_images
+ ;;
+ esac
}
_docker_image_tag() {
@@ -3073,21 +3087,7 @@ _docker_run() {
}
_docker_save() {
- case "$prev" in
- --output|-o)
- _filedir
- return
- ;;
- esac
-
- case "$cur" in
- -*)
- COMPREPLY=( $( compgen -W "--help --output -o" -- "$cur" ) )
- ;;
- *)
- __docker_complete_images
- ;;
- esac
+ _docker_image_save
}
_docker_search() {
