diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2024-08-12 15:15:15 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-08-12 20:19:01 +0200 |
commit | fe5a6c47af675bc0020c545d86fb103492e1d77c (patch) | |
tree | 57a42c469cfb70708cbe7dad564a62267eba8ff1 /shell-completion | |
parent | mkosi: update debian commit reference (diff) | |
download | systemd-fe5a6c47af675bc0020c545d86fb103492e1d77c.tar.xz systemd-fe5a6c47af675bc0020c545d86fb103492e1d77c.zip |
systemd-run: add unit and invocation_id JSON output
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/systemd-run | 7 | ||||
-rw-r--r-- | shell-completion/zsh/_systemd-run | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/shell-completion/bash/systemd-run b/shell-completion/bash/systemd-run index 4bc82060e9..4537211ae5 100644 --- a/shell-completion/bash/systemd-run +++ b/shell-completion/bash/systemd-run @@ -38,7 +38,7 @@ _systemd_run() { --unit -p --property --slice --description --service-type --uid --gid --nice --working-directory -E --setenv --on-active --on-boot --on-startup --on-unit-active --on-unit-inactive --on-calendar --path-property --socket-property --timer-property -H --host -M --machine --expand-environment - --background + --background --json ) local OPTS="${opts_with_values[*]} --no-ask-password --scope -u --slice-inherit -r --remain-after-exit --send-sighup -d --same-dir -t --pty -P --pipe -S --shell -q --quiet --ignore-failure @@ -126,6 +126,11 @@ _systemd_run() { COMPREPLY=( $(compgen -W '$comps' -- "$cur" ) ) return 0 ;; + --json) + local comps='pretty short off' + COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) + return 0 + ;; esac COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") ) diff --git a/shell-completion/zsh/_systemd-run b/shell-completion/zsh/_systemd-run index d3ec2e28ef..4bb864da21 100644 --- a/shell-completion/zsh/_systemd-run +++ b/shell-completion/zsh/_systemd-run @@ -59,6 +59,7 @@ _arguments \ ))' \ '(-t --pty)'{-t,--pty}'[The service connects to the terminal]' \ '(-q --quiet)'{-q,--quiet}'[Suppresses additional informational output]' \ + '--json=[Output as JSON]:JSON:(pretty short off)' \ '(-r --remain-after-exit)'{-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \ '(-d --same-dir)'{-d,--same-dir}'[Run on the current working directory]' \ '--scope[Run this as scope rather than service]' \ |