summaryrefslogtreecommitdiffstats
path: root/shell-completion
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-07-23 20:22:30 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-11 17:25:27 +0200
commit8e04444385ddf6cbf9e172cc63e59a351ad39d74 (patch)
tree075d5f322fae930c9a72aef73329ff91e80119b3 /shell-completion
parentMerge pull request #10353 from keszybz/more-manager-reloading (diff)
downloadsystemd-8e04444385ddf6cbf9e172cc63e59a351ad39d74.tar.xz
systemd-8e04444385ddf6cbf9e172cc63e59a351ad39d74.zip
journalctl: port JSON output mode to new JSON API
Also, while we are at it, beef it up, by adding json-seq support (i.e. https://tools.ietf.org/html/rfc7464). This is particularly useful in conjunction with jq's --seq switch.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/journalctl2
-rw-r--r--shell-completion/bash/machinectl2
-rw-r--r--shell-completion/bash/systemctl.in2
-rw-r--r--shell-completion/zsh/_sd_outputmodes2
4 files changed, 4 insertions, 4 deletions
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index 5a5131e5b3..829cf415be 100644
--- a/shell-completion/bash/journalctl
+++ b/shell-completion/bash/journalctl
@@ -66,7 +66,7 @@ _journalctl() {
compopt -o filenames
;;
--output|-o)
- comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat with-unit'
+ comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse json-seq cat with-unit'
;;
--field|-F)
comps=$(journalctl --fields | sort 2>/dev/null)
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index aa5816bbf5..16d037a000 100644
--- a/shell-completion/bash/machinectl
+++ b/shell-completion/bash/machinectl
@@ -77,7 +77,7 @@ _machinectl() {
comps=''
;;
--output|-o)
- comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat'
+ comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse json-seq cat with-unit'
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 933bb1844f..8756bfb8a5 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -169,7 +169,7 @@ _systemctl () {
;;
--output|-o)
comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json
- json-pretty json-sse cat'
+ json-pretty json-sse json-seq cat with-unit'
;;
--machine|-M)
comps=$( __get_machines )
diff --git a/shell-completion/zsh/_sd_outputmodes b/shell-completion/zsh/_sd_outputmodes
index 70ff7233af..763b106f3d 100644
--- a/shell-completion/zsh/_sd_outputmodes
+++ b/shell-completion/zsh/_sd_outputmodes
@@ -2,5 +2,5 @@
# SPDX-License-Identifier: LGPL-2.1+
local -a _output_opts
-_output_opts=(short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat with-unit)
+_output_opts=(short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse json-seq cat with-unit)
_describe -t output 'output mode' _output_opts || compadd "$@"