File: bash.completion

package info (click to toggle)
swayimg 4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,776 kB
  • sloc: ansic: 13,527; cpp: 2,495; makefile: 9
file content (29 lines) | stat: -rw-r--r-- 727 bytes parent folder | download
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