summaryrefslogtreecommitdiff
path: root/bash-completion/secret-tool
blob: 45e920da644a5a8fe3c9598a4c4ad425893a28a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# secret-tool(8) completion

_secret-tool()
{
    local cur prev word cword
    _init_completion || return

    if [[ $cur == -* ]]; then
      local opts="--help --verbose -q --quiet"
      COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
      return
    elif [[ $cword -eq 1 ]]; then
      local commands='store lookup clear search'
      COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
    fi
} &&
complete -F _secret-tool secret-tool

# ex: filetype=sh