Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _jq: New completion.
- X-seq: zsh-workers 41833
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _jq: New completion.
- Date: Mon, 9 Oct 2017 00:17:31 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=a9zOnM HdfwTua44cR8YxG9APfh7AlgdUsnzByV3zkMk=; b=UvZMTctBZMbPgga5AAUuCa /uXeLTkxN6LNOjvFUa/ICrK7Qy1GdR8q2Q5WuKgl/jRDwZD3FaRAzFXBtdcwO0+1 NCHSQVeGR2/HxNXt3JMaW7/KIZI3MxrRAgnJIoMuhUBLNFWOQjUAs8cWaB2Bel5Q P5oS8O8cn60X5V+NAfV6oZuRr4cyjZZF6lm5QbpJgOp+8OxHYIzNg+Z6TTDkW3CH o0bFYx5H0xiXNywetYSVneSg5uo8JjDOd+d14HX5tIpyrZottZxGu8yAmNa4xszQ k+YimNmpWcp53nrRpKS6UrVNvqgEzZ2aB8fV6rhflpK5r2Ac+I3baUvvbSJjRITg ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=a9zOnM HdfwTua44cR8YxG9APfh7AlgdUsnzByV3zkMk=; b=PhC+BJ2FC7q+SWj55jJJp8 8aoBjATVMjal67C+gcslqzhR2Z8d2SS6KUvHiL22V7JWzfrSZOPqth3LtX3Dsb36 ieiBokQOO6k4xEPvutaZ2gKRGQSA3N1vWU/p3sPvtWwGcLSukACXhCZmCWLaapF/ BRQxMT0JcqVtXIgLiTKOwjBlrEnWyUyeuv8xAtdLNL/745D3qNxK8qYurJ5ykNW8 vnJ8kZA2HBf/KegKWL8xG8/7gN7iXKqX4o6VmHO1WJG4W/xb5zoSC7aPkIivP1iy wdASghT1yekUonDw9ZaQFBbElvUUrawG55Mst7dMlT51/nWmQUkIBBarYGLeAtKA ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
Completion/Unix/Command/_jq | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 Completion/Unix/Command/_jq
diff --git a/Completion/Unix/Command/_jq b/Completion/Unix/Command/_jq
new file mode 100644
index 000000000..24eb4cf52
--- /dev/null
+++ b/Completion/Unix/Command/_jq
@@ -0,0 +1,32 @@
+#compdef jq
+
+# last updated for jq-1.5-1-a5b5cbe (debian package 1.5+dfsg-1.3)
+
+# Note:
+# Arguments to options must be in separate words. Thus,
+# {-f,--from-file}'[foo]'
+# is correct like that, without the usual {-f+,--from-file=} suffixes.
+#
+_arguments -S -s : \
+ "--version[output jq's version number]" \
+ "--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]' \
+ '(-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)' \
+ '(-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]' \
+ '--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' \
+ '-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]: :_guard "|[A-Za-z][A-Za-z0-9]#" "variable name":value (string): ' \
+ '*--argjson[pre-set a variable to an object]: :_guard "|[A-Za-z][A-Za-z0-9]#" "variable name":value (JSON): ' \
+ '*--slurpfile[pre-set a variable to contents of a file]: :_guard "|[A-Za-z][A-Za-z0-9]#" "variable name":value (filename of file containing JSON):_files'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author