aboutsummaryrefslogtreecommitdiffstats
path: root/modules/scripts/gpg-backup/completion.zsh
blob: f47bbe87f687c53ec524065eb90e11a028463de4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#compdef gpg-backup

_arguments \
  '1: :->cmds' \
  '*::arg:->args'

case $state in
  cmds)
    local -a commands
    commands=(
      'export:Export all GPG keys to a passphrase-protected file'
      'import:Import GPG keys from a backup file'
    )
    _describe 'command' commands
    ;;
  args)
    case $words[1] in
      export|import)
        _files
        ;;
    esac
    ;;
esac