From 723d689679e88ef569b58ed6a7df1d11ea06d322 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Mon, 13 Jun 2016 23:10:05 -0700 Subject: Completion for string match --invert Also adds descriptions for some other options which were absent. --- share/completions/string.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/completions/string.fish b/share/completions/string.fish index 2966cac9..f207817d 100644 --- a/share/completions/string.fish +++ b/share/completions/string.fish @@ -1,7 +1,7 @@ # Completion for builtin string # This follows a strict command-then-options approach, so we can just test the number of tokens complete -f -c string -complete -f -c string -n "test (count (commandline -opc)) -ge 2; and not contains -- (commandline -opc)[2] escape" -s q -l quiet +complete -f -c string -n "test (count (commandline -opc)) -ge 2; and not contains -- (commandline -opc)[2] escape" -s q -l quiet -d "Do not print output" complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a "length" complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a "sub" complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sub" -s s -l start -a "(seq 1 10)" @@ -18,8 +18,9 @@ complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a "escape" complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] escape" -s n -l no-quoted -d "Escape with \\ instead of quoting" complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a "match" complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match" -s n -l index -d "Report index and length of the matches" +complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match" -s v -l invert -d "Report only non-matching input" complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a "replace" # All replace options are also valid for match complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s a -l all -d "Report all matches per line/string" -complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s i -l ignore-case +complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s i -l ignore-case -d "Case insensitive" complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s r -l regex -d "Use regex instead of globs" -- cgit v1.2.3