aboutsummaryrefslogtreecommitdiffstats
path: root/src/_age
blob: c30377d4c6d4b54eab87381c38da272657a662cd (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#compdef age age-keygen
# ------------------------------------------------------------------------------
# Description
# -----------
#
#  Completion script for age 1.2.1 (https://github.com/FiloSottile/age).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
#  * Hydrargyrum (https://github.com/hydrargyrum)
#
# ------------------------------------------------------------------------------

case $service in
  (age)
    _arguments \
      -A '-*' \
      '(- *)'{-h,--help}'[show help message and exit]' \
      '(-e --encrypt -d --decrypt)'{-e,--encrypt}'[Encrypt the input to the output. Default if omitted]' \
      '(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[Decrypt the input to the output]' \
      '(-o --output)'{-o,--output=}'[Write the result to the given file]:OUTPUT:_files' \
      '(-a --armor -d --decrypt)'{-a,--armor}'[Encrypt to a PEM encoded format]' \
      '(-p --passphrase -d --decrypt)'{-p,--passphrase}'[Encrypt with a passphrase]' \
      '(-d --decrypt)'\*{-r,--recipient=}'[Encrypt to the explicitly specified RECIPIENT]:RECIPIENT:' \
      '(-d --decrypt)'\*{-R,--recipients-file=}'[Encrypt to the RECIPIENTS listed in the file at PATH]:RECIPIENTS_FILE:_files' \
      \*{-i,--identity=}'[Use the given identify file]:IDENTITY:_files' \
      :INPUT:_files
    ;;
  (age-keygen)
    _arguments \
      '(-o --output)'{-o,--output}'[write the result to the given file]:file:_files' \
      '-y[convert an identity file to a recipients file]' \
      '*:input'
    ;;
esac

# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et