summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2018-05-22 12:22:00 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-05-25 14:45:34 +0200
commit49805b3d816aa2cd431690ac6571ca9a8acca55b (patch)
tree4dbbd59827a1f31c42538270f2999a7ad2945ce3 /shell-completion
parentc1a1b409ce9cac67340f039c99c71af7d0570791 (diff)
journalctl: add with-unit mode
When dealing with a large number of template instances, for example when launching daemons per VRF, it is hard for operators to correlate log lines to arguments. Add a new with-unit mode which, if available, prefixes unit and user unit names when displaying its log messages instead of the syslog identifier. It will also use the full timestamp with timezones, like the short-full mode.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/journalctl2
-rw-r--r--shell-completion/zsh/_sd_outputmodes2
2 files changed, 2 insertions, 2 deletions
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index d2b9a04706..8fcb42ad7b 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'
+ 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'
;;
--field|-F)
comps=$(journalctl --fields | sort 2>/dev/null)
diff --git a/shell-completion/zsh/_sd_outputmodes b/shell-completion/zsh/_sd_outputmodes
index 3b8850b3f0..70ff7233af 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)
+_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)
_describe -t output 'output mode' _output_opts || compadd "$@"