summaryrefslogtreecommitdiff
path: root/Completion/User/_mysql_utils
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-05 11:28:08 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-05 11:28:08 +0000
commitb8bdb144d2a310632efb3bbd7dd78d4f296bc62f (patch)
tree8c32a29b3e72dce2728535f4a5ead0be9a7f8e89 /Completion/User/_mysql_utils
parentfc426939cc5a8bc7acd809f9e013e6c10ede044f (diff)
downloadzsh-b8bdb144d2a310632efb3bbd7dd78d4f296bc62f.tar.gz
zsh-b8bdb144d2a310632efb3bbd7dd78d4f296bc62f.zip
use basename of commands instead of $words[1]
Diffstat (limited to 'Completion/User/_mysql_utils')
-rw-r--r--Completion/User/_mysql_utils24
1 files changed, 11 insertions, 13 deletions
diff --git a/Completion/User/_mysql_utils b/Completion/User/_mysql_utils
index 6d777112d..c696f774b 100644
--- a/Completion/User/_mysql_utils
+++ b/Completion/User/_mysql_utils
@@ -24,33 +24,33 @@ _mysql_hosts () {
local _mysql_user _mysql_port _mysql_host _mysql_params
_mysql_get_identity
- _wanted hosts expl 'server host' &&
+ _wanted hosts expl 'server host' \
_combination -s '[:@]' '' hosts-ports-users \
${_mysql_user:+users=${_mysql_user:q}} \
${_mysql_port:+ports=${_mysql_port:q}} \
- hosts "$expl[@]"
+ hosts -
}
_mysql_ports () {
local _mysql_user _mysql_port _mysql_host _mysql_params
_mysql_get_identity
- _wanted ports expl 'server port' &&
+ _wanted ports expl 'server port' \
_combination -s '[:@]' '' hosts-ports-users \
${_mysql_user:+users=${_mysql_user:q}} \
${_mysql_host:+hosts=${_mysql_host:q}} \
- ports "$expl[@]"
+ ports -
}
_mysql_users () {
local _mysql_user _mysql_port _mysql_host _mysql_params
_mysql_get_identity
- _wanted users expl 'server username' &&
+ _wanted users expl 'server username' \
_combination -s '[:@]' '' hosts-ports-users \
${_mysql_host:+hosts=${_mysql_host:q}} \
${_mysql_port:+ports=${_mysql_port:q}} \
- users "$expl[@]"
+ users -
}
_mysql_databases () {
@@ -205,15 +205,13 @@ _mysqladmin_commands () {
)
if (( CURRENT == 1 )); then
- _tags commands && compadd "$@" $cmds
+ _wanted commands expl command compadd "$@" - $cmds
else
local curcontext="$curcontext"
- case "$words[1]" in
- (create)
- ;&
- (drop)
- _wanted mysqldbs expl "MySQL databases" && _mysql_databases
+ case "${words[1]:t}" in
+ (create|drop)
+ _wanted mysqldbs expl "MySQL databases" _mysql_databases
;;
(kill)
_message 'thread ids'
@@ -226,7 +224,7 @@ _mysqladmin_commands () {
}
_mysql_utils () {
- case "$words[1]" in
+ case "${words[1]:t}" in
mysql)
_mysql "$@"
;;