/ fetchx / debian / fetchx.bash-completion
Swadhin Biswas feat: add multi-platform packaging and CI automation · 3/7/2026
492a637
30 lines · 911 Bytes
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
30
# fetchx bash completion

_fetchx() {
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    
    opts="--help --version --json --logo-only --emoji --nerd-font --stdout --no-color
          --bold --backend --source --ascii-distro --custom-image --gap --separator
          --show-config --print-config --create-config --select-image --init-api-image
          --daemon --tray-status --block-range-start --block-range-end --block-width"
    
    case "${prev}" in
        --backend|-b)
            COMPREPLY=($(compgen -W "ascii kitty sixel chafa w3m iterm2 off" -- ${cur}))
            return 0
            ;;
        --source|-s)
            COMPREPLY=($(compgen -W "auto ascii wallpaper" -- ${cur}))
            return 0
            ;;
    esac
    
    COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
    return 0
}

complete -F _fetchx fetchx