aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/mysql.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-02-12 00:07:27 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-02-12 00:07:27 +1300
commit2d69a56b9d1314658de29ace609a11d312a66130 (patch)
tree90487e5ea7baf315ea0a7db673cf701b86a36839 /bash/bash_completion.d/mysql.bash
parent18a5463ea2d39cb5502eb3cfba7281f03472bfd1 (diff)
downloaddotfiles-2d69a56b9d1314658de29ace609a11d312a66130.tar.gz
dotfiles-2d69a56b9d1314658de29ace609a11d312a66130.zip
Use bashdefault if available in more completions
Diffstat (limited to 'bash/bash_completion.d/mysql.bash')
-rw-r--r--bash/bash_completion.d/mysql.bash8
1 files changed, 7 insertions, 1 deletions
diff --git a/bash/bash_completion.d/mysql.bash b/bash/bash_completion.d/mysql.bash
index 9755f033..2886f62e 100644
--- a/bash/bash_completion.d/mysql.bash
+++ b/bash/bash_completion.d/mysql.bash
@@ -35,4 +35,10 @@ _mysql() {
fi
)
}
-complete -F _mysql -o default mysql
+
+# bashdefault requires Bash >=3.0
+if ((BASH_VERSINFO[0] >= 3)) ; then
+ complete -F _mysql -o bashdefault -o default mysql
+else
+ complete -F _mysql -o default mysql
+fi