[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 45511c54fca30c4a4b070e4875432b3c341ee767

Ville Skyttä ville.skytta at iki.fi
Mon Oct 19 21:42:18 UTC 2009


The following commit has been merged in the master branch:
commit 45511c54fca30c4a4b070e4875432b3c341ee767
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Oct 20 00:41:46 2009 +0300

    More mysqladmin options and option argument handling.

diff --git a/contrib/mysqladmin b/contrib/mysqladmin
index 033d909..407fdb7 100644
--- a/contrib/mysqladmin
+++ b/contrib/mysqladmin
@@ -16,6 +16,32 @@ _mysqladmin()
             COMPREPLY=( $( compgen -u -- "$cur" ) )
             return 0
             ;;
+        -h|--host)
+            _known_hosts_real "$cur"
+            return 0
+            ;;
+        --character-sets-dir|--ssl-capath)
+            _filedir -d
+            return 0
+            ;;
+        -S|--socket)
+            _filedir sock
+            return 0
+            ;;
+        --defaults-file|--defaults-extra-file)
+            _filedir
+            return 0
+            ;;
+        -c|--count|--default-character-set|-P|--port|-O|--set-variable|\
+        -i|--sleep|--ssl-ca|--ssl-cert|--ssl-cipher|--ssl-key|-w|--wait|\
+        --connect_timeout|--shutdown_timeout)
+            # Argument required but no completions available
+            return 0
+            ;;
+        '-?'|--help|-V|--version)
+            # All other options are noop with these
+            return 0
+            ;;
     esac
 
     $split && return 0
@@ -25,7 +51,8 @@ _mysqladmin()
         --no-beep --password --port --protocol --relative --set-variable \
         --silent --socket --sleep --ssl --ssl-ca --ssl-capath --ssl-cert \
         --ssl-cipher --ssl-key --ssl-verify-server-cert --user --verbose \
-        --version --vertical --wait --connect_timeout --shutdown_timeout' \
+        --version --vertical --wait --connect_timeout --shutdown_timeout \
+        --print-defaults --no-defaults --defaults-file --defaults-extra-file' \
         -- "$cur" ) )
 
     COMPREPLY=( "${COMPREPLY[@]}" \
@@ -34,7 +61,7 @@ _mysqladmin()
         kill password old-password ping processlist reload refresh shutdown \
         status start-slave stop-slave variables version' -- "$cur" ) )
 } &&
-complete -F _mysqladmin mysqladmin
+complete -F _mysqladmin $filenames mysqladmin
 
 # Local variables:
 # mode: shell-script

-- 
bash-completion



More information about the Bash-completion-commits mailing list