Add bash command completion

This commit is contained in:
Harshavardhana
2015-03-05 01:45:03 -08:00
parent 7df60328c2
commit 28be1c55ac
5 changed files with 36 additions and 13 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
_mc_completion() {
local cur prev opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -F _mc_completion mc