From 47ad707bbaaea533ef8e4202350a211366cbc641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Martinez?= Date: Thu, 2 Feb 2017 22:24:16 +0100 Subject: [PATCH] Add jq completions --- share/completions/jq.fish | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 share/completions/jq.fish diff --git a/share/completions/jq.fish b/share/completions/jq.fish new file mode 100644 index 000000000..6cc8e609d --- /dev/null +++ b/share/completions/jq.fish @@ -0,0 +1,27 @@ +# jq is a lightweight and flexible command-line JSON processor. +# See: https://stedolan.github.io/jq + +complete -c jq -l version -d 'Output version and exit' +complete -c jq -l seq -d 'Use application/json-seq MIME type scheme' +complete -c jq -l stream -d 'Parse input in streaming fasion' +complete -c jq -l slurp -s s -d 'Run filter just once in large array' +complete -c jq -l raw-input -s R -d 'Don\'t parse as JSON but as string' +complete -c jq -l null-input -s n -d 'Ignore input and treat it as null' +complete -c jq -l compact-output -s c -d 'Don\'t pretty-print JSON' +complete -c jq -l tab -d 'Use a tab for indentation instead of 2 spaces' +complete -c jq -l indent -x -d 'Use given number of spaces for indentation' +complete -c jq -l color-output -s C -d 'Color output' +complete -c jq -l monochrome-output -s M -d 'Don\'t color output' +complete -c jq -l ascii-output -s a -d 'Replace UTF-8 characters with escape sequences' +complete -c jq -l unbuffered -d 'Flush output after each JSON object is printed' +complete -c jq -l sort-keys -s S -d 'Sort object keys in output' +complete -c jq -l raw-output -s r -d 'If output is string ouput its content directly to stdout' +complete -c jq -l join-output -s j -d 'Raw ouput without newlines' +complete -c jq -l from-file -s f -r -d 'Read filter from file' +complete -c jq -s L -d 'Prepend given directory to search modules' +complete -c jq -l exit-status -s e -x -d 'Set exit status' +complete -c jq -l arg -x -d 'Set variable' +complete -c jq -l argjson -x -d 'Set JSON-encoded variable' +complete -c jq -l slurpfile -r -d 'Read JSON in file and bind to given variable' +complete -c jq -l argfile -r -d 'Read JSON in file and bind to given variable [see man]' +complete -c jq -l run-tests -r -d 'Run tests in given file'