1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
# swayimg(1) completion
_swayimg()
{
local cur=${COMP_WORDS[COMP_CWORD]}
local opts="-g --gallery \
-l --slideshow \
-F --from-file \
-r --recursive \
-o --order \
-s --scale \
-f --fullscreen \
-p --position \
-w --size \
-a --class \
-i --ipc \
-c --config \
-C --config-file \
-v --version \
-h --help"
if [[ ${cur} == -* ]]; then
COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
else
_filedir
fi
} &&
complete -o filenames -F _swayimg swayimg
# ex: filetype=sh
|