juk3n/fluffypublic Fork
⑂ main
Commits
⬇ Clone ▾
git clone https://git.rickub.com/juk3n/fluffy.git
git clone ssh://git@rickub.com/juk3n/fluffy.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

added rm to autocomplete (#43) 3f47fb3Unverified · on main · Adrian Duraj · 18d ago
fluffy-completion.bash · 17 lines · 470 BBash Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
_fluffy_complete() {
    local local cur prev opts
    COMREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"

    if [[ "$prev" == "fluffy" ]]; then
        local comms="play show add rm"
        COMPREPLY=( $(compgen -W "${comms}" -- "${cur}") )
    fi

    if [[ "$prev" == "play" ]]; then
        local games=$(fluffy only-games)
        COMPREPLY=( $(compgen -W "${games}" -- "${cur}") )
    fi
}
complete -F _fluffy_complete fluffy