summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/journalctl2
-rw-r--r--shell-completion/bash/systemctl.in2
-rw-r--r--shell-completion/zsh/_journalctl4
-rw-r--r--shell-completion/zsh/_sd_outputmodes2
-rw-r--r--shell-completion/zsh/_systemctl.in2
5 files changed, 7 insertions, 5 deletions
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index 53bedcd92e..a999a10df1 100644
--- a/shell-completion/bash/journalctl
+++ b/shell-completion/bash/journalctl
@@ -65,7 +65,7 @@ _journalctl() {
compopt -o filenames
;;
--output|-o)
- comps='short short-iso short-precise short-monotonic verbose export json json-pretty json-sse cat'
+ comps='short short-full short-iso short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat'
;;
--field|-F)
comps=$(journalctl --fields | sort 2>/dev/null)
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 6f2b3f122c..2a45dcbba0 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -145,7 +145,7 @@ _systemctl () {
comps='full enable-only disable-only'
;;
--output|-o)
- comps='short short-iso short-precise short-monotonic verbose export json
+ comps='short short-full short-iso short-precise short-monotonic short-unix verbose export json
json-pretty json-sse cat'
;;
--machine|-M)
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 2bee23b6d3..2271f7fa9c 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -23,7 +23,7 @@ _list_fields() {
_journal_none() {
local -a _commands _files _jrnl_none
# Setting use-cache will slow this down considerably
- _commands=( ${"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} )
+ _commands=( ${"$(_call_program commands "$service $_sys_service_mgr -F _EXE" 2>/dev/null)"} )
_jrnl_none='yes'
_alternative : \
'files:/dev files:_files -W /dev -P /dev/' \
@@ -51,6 +51,8 @@ _journal_boots() {
"bootid:boot ids:compadd -a _bootid"
}
+local -a _modes; _modes=("--user" "--system")
+local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}
_arguments -s \
{-h,--help}'[Show this help]' \
'--version[Show package version]' \
diff --git a/shell-completion/zsh/_sd_outputmodes b/shell-completion/zsh/_sd_outputmodes
index 3836f79b73..52617c6b7a 100644
--- a/shell-completion/zsh/_sd_outputmodes
+++ b/shell-completion/zsh/_sd_outputmodes
@@ -1,5 +1,5 @@
#autoload
local -a _output_opts
-_output_opts=(short short-iso short-precise short-monotonic verbose export json json-pretty json-sse cat)
+_output_opts=(short short-full short-iso short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat)
_describe -t output 'output mode' _output_opts || compadd "$@"
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 44c31b7833..69f643303d 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -126,7 +126,7 @@ _filter_units_by_property() {
local property=$1 value=$2 ; shift ; shift
local -a units ; units=($*)
local props
- for props in ${(ps:\n\n:)"$(_call_program units "$service show --no-pager --property="Id,$property" -- ${units} 2>/dev/null")"}; do
+ for props in ${(ps:\n\n:)"$(_call_program units "$service $_sys_service_mgr show --no-pager --property="Id,$property" -- ${units} 2>/dev/null")"}; do
props=(${(f)props})
if [[ "${props[2]}" = "$property=$value" ]]; then
echo -E - " ${props[1]#Id=}"