diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-02 18:03:15 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-02 18:03:15 +1300 |
commit | 693fc13bb98b17938f2208fbadaec1996822fc5e (patch) | |
tree | 4a9cc6179f521528c663c8ab5f3bbc59dc57eaa0 /bash/bash_completion.d/mysql.bash | |
parent | Merge branch 'release/v2.6.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-693fc13bb98b17938f2208fbadaec1996822fc5e.tar.gz dotfiles-693fc13bb98b17938f2208fbadaec1996822fc5e.zip |
Merge branch 'release/v2.7.0'v2.7.0
* release/v2.7.0: (22 commits)
Bump VERSION
Make separate install-bash-completion target
Overhaul Bash completion scripts
Reduce ud() completion to just dirnames
Upgrade uncap_ex.vim plugin to v0.3.0
Apply syntax fixes to last _text_filenames specs
Rearrange _text_filenames completion a little
Remove prompt() completion
Throw away chgrp completion
Throw away Git Bash completion
Remove mysql(1) completion
Use consistent temp names for shell subfile vars
Overhaul pass(1) completion
Adjust syntax of two more completion loads
Remove ftp(1) completion
Remove `kill` completion
Use the positional parameter aliases for words
Overhaul bd() completion again
Remove unneeded -q option to shopt -s commands
Don't include dotfiles in keep() names
...
Diffstat (limited to 'bash/bash_completion.d/mysql.bash')
-rw-r--r-- | bash/bash_completion.d/mysql.bash | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/bash/bash_completion.d/mysql.bash b/bash/bash_completion.d/mysql.bash deleted file mode 100644 index 3ff97090..00000000 --- a/bash/bash_completion.d/mysql.bash +++ /dev/null @@ -1,42 +0,0 @@ -# Completion setup for MySQL for configured databases -_mysql() { - - # Only makes sense for first argument - ((COMP_CWORD == 1)) || return - - # Bail if directory doesn't exist - local dirname - dirname=$HOME/.mysql - [[ -d $dirname ]] || return - - # Return the names of the .cnf files sans prefix as completions - local db - while IFS= read -rd '' db ; do - [[ -n $db ]] || continue - COMPREPLY[${#COMPREPLY[@]}]=$db - done < <( - - # Set options so that globs expand correctly - shopt -s dotglob nullglob - - # Make globbing case-insensitive if appropriate - while read -r _ setting ; do - case $setting in - ('completion-ignore-case on') - shopt -s nocaseglob - break - ;; - esac - done < <(bind -v) - - # Collect all the config file names, strip off leading path and .cnf - local -a cnfs - cnfs=("$dirname"/"${COMP_WORDS[COMP_CWORD]}"*.cnf) - cnfs=("${cnfs[@]#"$dirname"/}") - cnfs=("${cnfs[@]%.cnf}") - - # Print quoted entries, null-delimited - printf '%q\0' "${cnfs[@]}" - ) -} -complete -F _mysql -o bashdefault -o default mysql |