From e7e4d8415b242d4124c7af6fa992e296fd6a3427 Mon Sep 17 00:00:00 2001 From: Bagohart Date: Mon, 11 Jul 2022 13:48:25 +0200 Subject: [PATCH] added tab completions for choose (cherry picked from commit ce6b122f7f70e4e77153943b97c0fe53f1f8fe20) --- CHANGELOG.rst | 1 + share/completions/choose.fish | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 share/completions/choose.fish diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c8d3f577d..383f85268 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ This release of fish introduces the following small enhancements: - ``history merge`` when in private mode is now an error, rather than wiping out other sessions' history (:issue:`9050`). - The error message when launching a command that is built for the wrong architecture on macOS is more helpful (:issue:`9052`). - Added completions for: + - ``choose`` (:issue:`9065`) - ``expect`` (:issue:`9060`) = ``navi`` (:issue:`9064`) - ``qdbus`` (:issue:`9031`) diff --git a/share/completions/choose.fish b/share/completions/choose.fish new file mode 100644 index 000000000..06761467c --- /dev/null +++ b/share/completions/choose.fish @@ -0,0 +1,15 @@ +complete choose --no-files + +# flags: +complete choose -s c -l character-wise -d "Choose fields by character number" +complete choose -s d -l debug -d "Activate debug mode" +complete choose -s x -l exclusive -d "Use exclusive ranges, similar to array indexing in many programming languages" +complete choose -x -s h -l help -d "Prints help information" +complete choose -s n -l non-greedy -d "Use non-greedy field separators" +complete choose -l one-indexed -d "Index from 1 instead of 0" +complete choose -s V -l version -d "Prints version information" + +# options: +complete choose -x -s f -l field-separator -d "Specify field separator other than whitespace, using Rust `regex` syntax" +complete choose -r -s i -l input -d "Specify input file" +complete choose -x -s o -l output-field-separator -d "Specify output field separator"