ocarina: Add in bash command completion
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
8a08967a48
commit
31339bed2f
|
@ -0,0 +1,18 @@
|
|||
|
||||
_ocarina()
|
||||
{
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
cmd="${COMP_WORDS[1]}"
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
opts=`compgen -c "ocarina-" | awk -F "-" '{print $2}'`
|
||||
opts="$opts next pause play prev stop toggle"
|
||||
fi
|
||||
|
||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||
return 0
|
||||
|
||||
}
|
||||
|
||||
complete -F _ocarina ocarina
|
Loading…
Reference in New Issue