[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1bfaacd1a0a79b26b682ed8676341ee88f4ee92d
Guillaume Rousse
guillomovitch at zarb.org
Wed May 20 23:42:44 UTC 2009
The following commit has been merged in the master branch:
commit 05eca6e6b92b809c4a15761a3980b6a59fd07b60
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date: Thu May 21 01:23:58 2009 +0200
split mysqladmin completion
diff --git a/Makefile.am b/Makefile.am
index 28057e5..8acf564 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,6 +48,7 @@ bashcomp_DATA = contrib/ant \
contrib/monodevelop \
contrib/mplayer \
contrib/msynctool \
+ contrib/mysqladmin \
contrib/mtx \
contrib/munin-node \
contrib/ncftp \
diff --git a/bash_completion b/bash_completion
index 4c3655f..748bb2d 100644
--- a/bash_completion
+++ b/bash_completion
@@ -3435,39 +3435,6 @@ _nslookup()
} &&
complete -F _nslookup nslookup
-# mysqladmin(1) completion
-#
-have mysqladmin &&
-_mysqladmin()
-{
- local cur prev
-
- COMPREPLY=()
- cur=`_get_cword`
- prev=${COMP_WORDS[COMP_CWORD-1]}
-
- case "$prev" in
- -u)
- COMPREPLY=( $( compgen -u -- $cur ) )
- return 0
- ;;
- *)
- ;;
- esac
-
- COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
- -v -V -w' -- $cur ) )
-
- COMPREPLY=( "${COMPREPLY[@]}" \
- $( compgen -W 'create drop extended-status flush-hosts \
- flush-logs flush-status flush-tables \
- flush-threads flush-privileges kill \
- password ping processlist reload refresh \
- shutdown status variables version' \
- -- $cur ) )
-} &&
-complete -F _mysqladmin mysqladmin
-
_longopt()
{
local cur prev
diff --git a/contrib/mysqladmin b/contrib/mysqladmin
new file mode 100644
index 0000000..49c7a46
--- /dev/null
+++ b/contrib/mysqladmin
@@ -0,0 +1,35 @@
+# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
+# ex: ts=8 sw=8 noet filetype=sh
+#
+# bash completion for mysqladmin
+
+have mysqladmin &&
+_mysqladmin()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -u)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
+ -v -V -w' -- $cur ) )
+
+ COMPREPLY=( "${COMPREPLY[@]}" \
+ $( compgen -W 'create drop extended-status flush-hosts \
+ flush-logs flush-status flush-tables \
+ flush-threads flush-privileges kill \
+ password ping processlist reload refresh \
+ shutdown status variables version' \
+ -- $cur ) )
+} &&
+complete -F _mysqladmin mysqladmin
--
bash-completion
More information about the Bash-completion-commits
mailing list