]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shell-completion: update run0 completion
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>
Tue, 3 Mar 2026 08:25:55 +0000 (17:25 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 3 Mar 2026 12:35:28 +0000 (12:35 +0000)
shell-completion/zsh/_run0

index dc95486bef3193042a52cf60e101d517341d619c..f76be2e5ff0dccf63c7a33ae4b709a050d828bd2 100644 (file)
@@ -39,20 +39,29 @@ _run0_slices() {
 local -a args=(
     '--no-ask-password[Do not query the user for authentication]'
     '--unit=[Use this unit name instead of an automatically generated one]'
-    {--property=,-p+}'[Sets a property on the service unit created]:property:_run0_unit_properties'
-    '--description=[Provide a description for the service unit]'
+    {'*--property=','*-p+'}'[Sets a property on the service unit created]:property:_run0_unit_properties'
+    '--description=[Provide a description for the service unit]:TEXT'
     '--slice=[Make the new .service unit part of the specified slice]:slice unit:_run0_slices'
     '--slice-inherit[Make the new service unit part of the current slice]'
-    {--user=,-u+}'[Switch to the specified user]:user:_users'
-    {--group=,-g+}'[Switch to the specified group]:group:_groups'
+    '(--user -u)'{--user=,-u+}'[Switch to the specified user]:user:_users'
+    '(--group -g)'{--group=,-g+}'[Switch to the specified group]:group:_groups'
     '--nice=[Run with specified nice level]:nice value'
-    {--chdir=,-D+}'[Run within the specified working directory]:directory:_files -/'
-    '--setenv=[Set the specified environment variable in the session]:environment variable:_parameters -g "*export*" -S = -q'
+    '(--chdir -D -i --same-root-dir)'{--chdir=,-D+}'[Run within the specified working directory]:directory:_files -/'
+    '(-i)'--via-shell"[Invoke command via target user's login shell]"
+    '(--via-shell --chdir -D --same-root-dir)'-i"[Shortcut for --via-shell --chdir='~']"
+    '*--setenv=[Set the specified environment variable in the session]:environment variable:_parameters -g "*export*" -S = -q'
     '--background=[Change the terminal background color to the specified ANSI color]:ansi color'
+    '(--pty-late --pipe)'--pty'[Request allocation of a pseudo TTY for stdio]'
+    '(--pty --pipe)'--pty-late'[Just like --pty, but leave TTY access to agents until unit is started up]'
+    "(--pty --pty-late)--pipe[request passing the caller's STDIO file descriptors directly through]"
+    '--shell-prompt-prefix=[Set $SHELL_PROMPT_PREFIX]:PREFIX'
+    '--lightweight=[Control whether to register a session with service manager or without]:bool:_values bool true false'
     '--machine=[Execute the operation on a local container]:machine:_sd_machines'
-    {-h,--help}'[Show the help text and exit]'
-    '--version[Print a short version string and exit]'
+    '--area=[Home area to log into]:AREA'
+    '(- *)'{-h,--help}'[Show the help text and exit]'
+    '(- *)'{-V,--version}'[Print a short version string and exit]'
     '--empower[Give privileges to selected or current user]'
+    '(--chdir -D -i)--same-root-dir[Execute the run0 session in the same root directory that the run0 command is executed in]'
 )
 
 _arguments -S $args '*:: :{_normal -p $service}'