From ffb616822153fc77f78c221afd8459638aa0e54e Mon Sep 17 00:00:00 2001 From: "Kevin F. Konrad" Date: Fri, 26 May 2023 11:34:19 +0200 Subject: [PATCH] implement completion for age and age-keygen --- CHANGELOG.rst | 2 ++ share/completions/age-keygen.fish | 3 +++ share/completions/age.fish | 9 +++++++++ 3 files changed, 14 insertions(+) create mode 100644 share/completions/age-keygen.fish create mode 100644 share/completions/age.fish diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 55add3367..3ef8ddb96 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -35,6 +35,8 @@ Completions - ``ar`` (:issue:`9719`) - ``gcc`` completion descriptions have been clarified and shortened (:issue:`9722`). - ``qdbus`` completions now properly handle tags (:issue:`9776`). +- ``age`` (:issue:`9813`). +- ``age-keygen`` (:issue:`9813`). Improved terminal support ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/share/completions/age-keygen.fish b/share/completions/age-keygen.fish new file mode 100644 index 000000000..49d4707a4 --- /dev/null +++ b/share/completions/age-keygen.fish @@ -0,0 +1,3 @@ +complete -c age-keygen -s o -l output -n "not __fish_contains_opt -s o output" -d "output file for secret key" +complete -c age-keygen -s y -n "not __fish_contains_opt -s y" -d "read identity file, print recipient(s)" +complete -c age -l version -d "print version number" diff --git a/share/completions/age.fish b/share/completions/age.fish new file mode 100644 index 000000000..c5cce228c --- /dev/null +++ b/share/completions/age.fish @@ -0,0 +1,9 @@ +complete -c age -s e -l encrypt -n "not __fish_contains_opt -s d decrypt" -d "encrypt" +complete -c age -s r -l recipient -n "not __fish_contains_opt -s d decrypt; and not __fish_contains_opt -s p passphrase" -d "public key" +complete -c age -s R -l recipients-file -n "not __fish_contains_opt -s d decrypt; and not __fish_contains_opt -s p passphrase" -d "file with public key(s)" +complete -c age -s a -l armor -n "not __fish_contains_opt -s d decrypt" -d "PEM encode ciphertext" +complete -c age -s p -l passphrase -n "not __fish_contains_opt -s d decrypt; and not __fish_contains_opt -s r recipient -s R recipients-file" -d "passphrase" +complete -c age -s d -l decrypt -n "not __fish_contains_opt -s e encrypt" -d "decrypt" +complete -c age -s i -l identity -n "__fish_contains_opt -s e encrypt -s d decrypt" -d "file with private key(s)" +complete -c age -s j -n "__fish_contains_opt -s e encrypt -s d decrypt" -d "plugin" +complete -c age -l version -d "print version number"