aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/mysql.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-10-12 20:52:54 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-10-12 20:52:54 +1300
commitb43f3f7aafbede00ba9c63697a2db659f1d60e9c (patch)
tree3448303e47b161350746184ff83ff9be75b550bc /bash/bashrc.d/mysql.bash
parentInline unneeded variable in completion function (diff)
downloaddotfiles-b43f3f7aafbede00ba9c63697a2db659f1d60e9c.tar.gz
dotfiles-b43f3f7aafbede00ba9c63697a2db659f1d60e9c.zip
Adjust declarations of local vars in compspecs
Diffstat (limited to 'bash/bashrc.d/mysql.bash')
-rw-r--r--bash/bashrc.d/mysql.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/mysql.bash b/bash/bashrc.d/mysql.bash
index 45bdef8d..992d342c 100644
--- a/bash/bashrc.d/mysql.bash
+++ b/bash/bashrc.d/mysql.bash
@@ -20,6 +20,7 @@ mysql() {
# Completion setup for MySQL for configured databases
_mysql() {
+ local word=${COMP_WORDS[COMP_CWORD]}
# Check directory exists and has at least one .cnf file
local dir="$HOME"/.mysql
@@ -33,7 +34,6 @@ _mysql() {
fi
# Return the names of the .cnf files sans prefix as completions
- local word=${COMP_WORDS[COMP_CWORD]}
local -a items
items=("$dir"/*.cnf)
items=("${items[@]##*/}")