diff options
Diffstat (limited to 'Completion/Unix/Command/_jq')
-rw-r--r-- | Completion/Unix/Command/_jq | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Completion/Unix/Command/_jq b/Completion/Unix/Command/_jq index b8e41dd66..e8e6b0913 100644 --- a/Completion/Unix/Command/_jq +++ b/Completion/Unix/Command/_jq @@ -1,6 +1,7 @@ #compdef jq -# last updated for jq-1.5-1-a5b5cbe (debian package 1.5+dfsg-1.3) +local ign +(( $#words > 2 )) && ign='!' # Note: # Arguments to options must be in separate words. Thus, @@ -8,23 +9,27 @@ # is correct like that, without the usual {-f+,--from-file=} suffixes. # _arguments -S -s : \ - "--version[output jq's version number]" \ + "${ign}(- 1 *)"{-V,--version}'[display version information]' \ + "${ign}(- 1 *)"{-h,--help}'[display help information]' \ + "${ign}(- 1 *)--build-configuration[display jq's build configuration]" \ "--seq[use application/json-seq ASCII RS/LF scheme in input and output]" \ - "--stream[parse input streamily (changes output)]" \ - '(-s --slurp)'{-s,--slurp}'[join input JSON objects to array before filtering]' \ - '(-R --raw-input)'{-R,--raw-input}'[consider each input line as a JSON strings]' \ - '(-n --null-input)'{-n,--null-input}'[input is ignored]' \ + "(--stream-errors -n --null-input)--stream[parse the input value in streaming fashion]" \ + '(--stream -n --null-input)--stream-errors[parse the input value in streaming fashion with errors as an array]' \ + '(-s --slurp -n --null-input)'{-s,--slurp}'[read all inputs into an array and use it as single input value]' \ + '(-R --raw-input -n --null-input)'{-R,--raw-input}'[read each line as string instead of JSON]' \ + '(-n --null-input --stream --stream-errors -s --slurp -R --raw-input)'{-n,--null-input}'[use `null` as the single input value]' \ '(-c --compact-output)'{-c,--compact-output}"[don't pretty-print]" \ '(--indent)--tab[indent output using TAB characters]' \ - '(--tab)--indent[indent output using given number of spaces]:number of spaces (integer):(2 4 8)' \ + '(--tab)--indent[indent output using given number of spaces]:number of spaces (integer):(-1 0 1 2 3 4 5 6 7)' \ '(-C --color-output -M --monochrome-output)'{-C,--color-output}'[output in color]' \ '(-C --color-output -M --monochrome-output)'{-M,--monochrome-output}'[output without color]' \ - '(-a --ascii-output)'{-a,--ascii-output}'[restrict output to ASCII]' \ + '(-a --ascii-output)'{-a,--ascii-output}'[restrict output to ASCII using escape sequences]' \ '--unbuffered[flush output after each JSON object]' \ '(-S --sort-keys)'{-S,--sort-keys}'[output object keys in sorted order]' \ - '(-r --raw-output -j --join-output)'{-r,--raw-output}"[don't JSON-quote output if it's a string]" \ - '(-r --raw-output -j --join-output)'{-j,--join-output}"[like -r, without newlines between outputs]" \ - '(-f --from-file)'{-f,--from-file}'[read filter from file]:_files' \ + '(-r --raw-output -j --join-output --raw-output0)'{-r,--raw-output}"[don't JSON-quote output if it's a string]" \ + '(-r --raw-output -j --join-output)--raw-output0[like -r, with NUL after each output]' \ + '(-r --raw-output --raw-output0 -j --join-output)'{-j,--join-output}"[like -r, without newlines between outputs]" \ + '(-f --from-file)'{-f,--from-file}'[read filter from file]: :_files' \ '-L+[prepend a directory to the module search path]:_directories' \ '(-e --exit-status)'{-e,--exit-status}'[report "false" and "null" results via exit code]' \ '*--arg[pre-set a variable to a string]:variable name: :value (string)' \ |