Ading new options from the 1.4 release

This commit is contained in:
gkze 2015-01-28 20:18:14 -08:00
parent 5300336e77
commit 36a54e16e1
1 changed files with 16 additions and 12 deletions

28
src/_jq
View File

@ -40,18 +40,22 @@
declare -a opts args
args=(
'(-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]'
'(-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 character]'
'(-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: '
'(--argfile)'{--argfile}'[This option passes the first value from the named file as a value to the jq program as a predefined variable]'
'(--unbuffered)'{--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'
)