mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-07 01:15:33 +00:00
32 lines
770 B
Text
32 lines
770 B
Text
#/usr/bin/env bash
|
|
|
|
_km-kvk2ldml_completions()
|
|
{
|
|
local cur prev opts
|
|
COMPREPLY=()
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
opts="-h --help -p --print -k --keys -o --output -v --verbose -vv --veryverbose --version"
|
|
|
|
if [[ ${cur} == -* ]] ; then
|
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
return 0
|
|
fi
|
|
|
|
case "${prev}" in
|
|
"-o"|"--output")
|
|
local IFS=$'\n'
|
|
compopt -o filenames
|
|
COMPREPLY=( $(compgen -f -- $cur) )
|
|
return 0
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
local IFS=$'\n'
|
|
compopt -o filenames
|
|
COMPREPLY=( $(compgen -f -X "!"*.kvk -- $cur) $(compgen -d -- $cur) )
|
|
}
|
|
|
|
complete -F _km-kvk2ldml_completions km-kvk2ldml
|