Merge pull request #285 from gkze/master
Add --sort-keys/-S option to _jq
This commit is contained in:
commit
61f24a63ea
27
src/_jq
27
src/_jq
|
@ -40,17 +40,22 @@
|
|||
|
||||
declare -a opts args
|
||||
args=(
|
||||
'(-h --help)'{-h,--help}'[display help information]'
|
||||
'(-V --version)'{-V,--version}'[display version information]'
|
||||
'(-s --slurp)'{-s,--slurp}'[run the filter just once]'
|
||||
'(-R --raw-input)'{-R,--raw-input}'[parse the input as not JSON but string]'
|
||||
'(-n --null-input)'{-n,--null-input}'[run the filter using null as the input]'
|
||||
'(-c --compact-output)'{-c,--compact-output}'[compact output]' \
|
||||
'(-C --color-output)'{-C,--color-output}'[colorize the output even if writing to a pipe or a file]'
|
||||
'(-M --monochrome-output)'{-M,--monochrome-output}'[not colorize the output]'
|
||||
'(-a --ascii-output)'{-a,--ascii-output}'[output with pure ASCII character]'
|
||||
'(-r --raw-output)'{-r,--raw-output}'[not format string result as a JSON string with quotes]'
|
||||
'--arg[passes a value to the jq program, e.g. --arg foo bar]:jq variable: '
|
||||
'--argfile[This option passes the first value from the named file as a value to the jq program as a predefined variable]'
|
||||
'--unbuffered[Flush the output after each JSON object is printed]'
|
||||
'(-C --color-output)'{-C,--color-output}'[Colorize the output even if writing to a pipe or a file]'
|
||||
'(-I --online-input)'{-I,--online-input}'[When the top-level input value is an array produce its elements instead of the array]'
|
||||
'(-M --monochrome-output)'{-M,--monochrome-output}'[Not colorize the output]'
|
||||
'(-R --raw-input)'{-R,--raw-input}'[Parse the input as not JSON but string]'
|
||||
'(-S --sort-keys)'{-S,--sort-keys}'[Output the fields of each object with the keys in sorted order]'
|
||||
'(-V --version)'{-V,--version}'[Display version information]'
|
||||
'(-a --ascii-output)'{-a,--ascii-output}'[Output with pure ASCII characters]'
|
||||
'(-e --exit-status)'{-e,--exit-status}'[Sets the exitstatus of jq to 0 if the last output values was neither false nor null, 1 if the last output value was either false or null, or 4 if no valid result was ever produced]'
|
||||
'(-c --compact-output)'{-c,--compact-output}'[Compact output]'
|
||||
'(-h --help)'{-h,--help}'[Display help information]'
|
||||
'(-n --null-input)'{-n,--null-input}'[Run the filter using null as the input]'
|
||||
'(-r --raw-output)'{-r,--raw-output}'[Not format string result as a JSON string with quotes]'
|
||||
'(-s --slurp)'{-s,--slurp}'[Run the filter just once]'
|
||||
'--arg[Passes a value to the jq program, e.g. --arg foo bar]:jq variable: '
|
||||
'1: :_guard "^-*" pattern'
|
||||
'*:files:->file'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue