Split bash-completion snippet in small ones

/usr/share/bash-completion/completions/ now uses dynamic loading based on file name.
This commit is contained in:
Nirgal Vourgère
2015-05-30 15:40:58 +02:00
parent 428834bbc4
commit 584119e415
13 changed files with 219 additions and 217 deletions

View File

@@ -0,0 +1,17 @@
#-*- mode: shell-script;-*-
have mdb-ver &&
_mdb_ver()
{
local cur
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-M -h --help' -- $cur ) )
else
_filedir '@(mdb|mdw|accdb)'
fi
return 0
} &&
complete -F _mdb_ver mdb-ver