chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: add a bit of syntactic sugar to run short code fragments with a different umask
[elogind.git]
/
shell-completion
/
systemd-zsh-completion.zsh
diff --git
a/shell-completion/systemd-zsh-completion.zsh
b/shell-completion/systemd-zsh-completion.zsh
index 93d64b3ad386c8e5373d6e8baa0eeb6bbe4e54ff..a8f7081459236a28332eb3fcf9b9ee78eeeee48e 100644
(file)
--- a/
shell-completion/systemd-zsh-completion.zsh
+++ b/
shell-completion/systemd-zsh-completion.zsh
@@
-27,8
+27,6
@@
_ctls()
'--no-legend[Do not print a legend, i.e. the column headers and the footer with hints]' \
'--no-pager[Do not pipe output into a pager]' \
'--no-ask-password[Do not ask for system passwords]' \
'--no-legend[Do not print a legend, i.e. the column headers and the footer with hints]' \
'--no-pager[Do not pipe output into a pager]' \
'--no-ask-password[Do not ask for system passwords]' \
- '--order[When generating graph for dot, show only order]' \
- '--require[When generating graph for dot, show only requirement]' \
'--system[Connect to system manager]' \
'--user[Connect to user service manager]' \
'--global[Enable/disable unit files globally]' \
'--system[Connect to system manager]' \
'--user[Connect to user service manager]' \
'--global[Enable/disable unit files globally]' \
@@
-72,6
+70,7
@@
_ctls()
{-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \
{-b,--this-boot}'[Show data only from current boot]' \
{-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
{-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \
{-b,--this-boot}'[Show data only from current boot]' \
{-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
+ '--user-unit[Show data only from the specified user session unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
{-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \
{-f,--follow}'[Follow journal]' \
{-n,--lines=}'[Number of journal entries to show]:integer' \
{-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \
{-f,--follow}'[Follow journal]' \
{-n,--lines=}'[Number of journal entries to show]:integer' \
@@
-95,6
+94,7
@@
_ctls()
'--verify[Verify journal file consistency]' \
'--list-catalog[List messages in catalog]' \
'--update-catalog[Update binary catalog database]' \
'--verify[Verify journal file consistency]' \
'--list-catalog[List messages in catalog]' \
'--update-catalog[Update binary catalog database]' \
+ '*::default: _journal_none'
;;
localectl)
_arguments \
;;
localectl)
_arguments \
@@
-136,6
+136,8
@@
_ctls()
_arguments \
{-h,--help}'[Show help text.]' \
'--user[Shows performance data of user sessions instead of the system manager.]' \
_arguments \
{-h,--help}'[Show help text.]' \
'--user[Shows performance data of user sessions instead of the system manager.]' \
+ '--order[When generating graph for dot, show only order]' \
+ '--require[When generating graph for dot, show only requirement]' \
'*::systemd-analyze commands:_systemd_analyze_command'
;;
systemd-ask-password)
'*::systemd-analyze commands:_systemd_analyze_command'
;;
systemd-ask-password)
@@
-271,7
+273,7
@@
_systemd-nspawn(){
}
_systemd_inhibit_command(){
}
_systemd_inhibit_command(){
- if (( CURRENT == 1 )); then
+ if (( CURRENT == 1 )); then
compset -q
_normal
else
compset -q
_normal
else
@@
-293,6
+295,7
@@
_systemd_analyze_command(){
'time:Print the time taken to start'
'blame:prints a list of all running units, ordered by the time they took to initialize'
'plot:prints an SVG graphic detailing which system services have been started at what time'
'time:Print the time taken to start'
'blame:prints a list of all running units, ordered by the time they took to initialize'
'plot:prints an SVG graphic detailing which system services have been started at what time'
+ 'dot:Dump dependency graph for dot(1)'
)
if (( CURRENT == 1 )); then
)
if (( CURRENT == 1 )); then
@@
-314,7
+317,7
@@
_outputmodes() {
_output_opts=(short short-monotonic verbose export json json-pretty json-see cat)
_describe -t output 'output mode' _output_opts || compadd "$@"
}
_output_opts=(short short-monotonic verbose export json json-pretty json-see cat)
_describe -t output 'output mode' _output_opts || compadd "$@"
}
-
+
(( $+functions[_systemctl_command] )) || _systemctl_command()
{
(( $+functions[_systemctl_command] )) || _systemctl_command()
{
@@
-329,10
+332,13
@@
_outputmodes() {
"try-restart:Restart one or more units if active"
"reload-or-restart:Reload one or more units if possible, otherwise start or restart"
"force-reload:Reload one or more units if possible, otherwise restart if active"
"try-restart:Restart one or more units if active"
"reload-or-restart:Reload one or more units if possible, otherwise start or restart"
"force-reload:Reload one or more units if possible, otherwise restart if active"
+ "hibernate:Hibernate the system"
+ "hybrid-sleep:Hibernate and suspend the system"
"reload-or-try-restart:Reload one or more units if possible, otherwise restart if active"
"isolate:Start one unit and stop all others"
"kill:Send signal to processes of a unit"
"is-active:Check whether units are active"
"reload-or-try-restart:Reload one or more units if possible, otherwise restart if active"
"isolate:Start one unit and stop all others"
"kill:Send signal to processes of a unit"
"is-active:Check whether units are active"
+ "is-failed:Check whether units are failed"
"status:Show runtime status of one or more units"
"show:Show properties of one or more units/jobs or the manager"
"reset-failed:Reset failed state for all, one, or more units"
"status:Show runtime status of one or more units"
"show:Show properties of one or more units/jobs or the manager"
"reset-failed:Reset failed state for all, one, or more units"
@@
-349,7
+355,6
@@
_outputmodes() {
"list-jobs:List jobs"
"cancel:Cancel all, one, or more jobs"
"dump:Dump server status"
"list-jobs:List jobs"
"cancel:Cancel all, one, or more jobs"
"dump:Dump server status"
- "dot:Dump dependency graph for dot(1)"
"snapshot:Create a snapshot"
"delete:Remove one or more snapshots"
"show-environment:Dump environment"
"snapshot:Create a snapshot"
"delete:Remove one or more snapshots"
"show-environment:Dump environment"
@@
-455,7
+460,7
@@
_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files
_systemctl_masked_units() {_sys_masked_units=( $(__systemctl list-unit-files | { while read a b; do [[ $b == "masked" ]] && echo "$a"; done; }) )}
# Completion functions for ALL_UNITS
_systemctl_masked_units() {_sys_masked_units=( $(__systemctl list-unit-files | { while read a b; do [[ $b == "masked" ]] && echo "$a"; done; }) )}
# Completion functions for ALL_UNITS
-for fun in is-active is-enabled status show mask preset ; do
+for fun in is-active is-
failed is-
enabled status show mask preset ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
_systemctl_really_all_units
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
_systemctl_really_all_units
@@
-572,7
+577,7
@@
done
(( $+functions[_systemctl_link] )) || _systemctl_link() { _files }
# no systemctl completion for:
(( $+functions[_systemctl_link] )) || _systemctl_link() { _files }
# no systemctl completion for:
-# [STANDALONE]='daemon-reexec daemon-reload default d
ot d
ump
+# [STANDALONE]='daemon-reexec daemon-reload default dump
# emergency exit halt kexec list-jobs list-units
# list-unit-files poweroff reboot rescue show-environment'
# [NAME]='snapshot load'
# emergency exit halt kexec list-jobs list-units
# list-unit-files poweroff reboot rescue show-environment'
# [NAME]='snapshot load'
@@
-604,6
+609,7
@@
_list_fields() {
_{P,U,G}ID _COMM _EXE _CMDLINE
_AUDIT_{SESSION,LOGINUID}
_SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
_{P,U,G}ID _COMM _EXE _CMDLINE
_AUDIT_{SESSION,LOGINUID}
_SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
+ _SYSTEMD_USER_UNIT
_SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
_{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
_KERNEL_{DEVICE,SUBSYSTEM}
_SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
_{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
_KERNEL_{DEVICE,SUBSYSTEM}
@@
-612,10
+618,19
@@
_list_fields() {
_describe 'possible fields' journal_fields
}
_describe 'possible fields' journal_fields
}
+_journal_none() {
+ local -a _commands _files
+ _commands=( ${(f)"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} )
+ _alternative : \
+ 'files:/dev files:_files -W /dev -P /dev/' \
+ "commands:commands:($_commands[@])" \
+ 'fields:fields:_list_fields'
+}
+
_journal_fields() {
local -a _fields cmd
cmd=("journalctl" "-F ${@[-1]}" "2>/dev/null" )
_journal_fields() {
local -a _fields cmd
cmd=("journalctl" "-F ${@[-1]}" "2>/dev/null" )
- _fields=( ${(f)"$(_call_program fields $cmd[@])"} )
+ _fields=( ${(f)"$(_call_program fields $cmd[@])"} )
typeset -U _fields
_describe 'possible values' _fields
}
typeset -U _fields
_describe 'possible values' _fields
}
@@
-772,8
+787,8
@@
_localectl_set-x11-keymap() {
#_model=( ${(f)"$(echo $_file[2] | awk '/^ / {print $1}')"} )
#_variant=( ${(f)"$(echo $_file[3] | awk '/^ / {print $1}')"} )
#_options=( ${(f)"$(echo ${_file[4]//:/\\:} | awk '/^ / {print $1}')"} )
#_model=( ${(f)"$(echo $_file[2] | awk '/^ / {print $1}')"} )
#_variant=( ${(f)"$(echo $_file[3] | awk '/^ / {print $1}')"} )
#_options=( ${(f)"$(echo ${_file[4]//:/\\:} | awk '/^ / {print $1}')"} )
-
- case $CURRENT in
+
+ case $CURRENT in
2) _describe layouts _layout ;;
3) _describe models _model;;
4) _describe variants _variant;;
2) _describe layouts _layout ;;
3) _describe models _model;;
4) _describe variants _variant;;
@@
-940,7
+955,7
@@
_udevadm_control(){
'--timeout=[The maximum number of seconds to wait for a reply from systemd-udevd.]' \
'--help[Print help text.]'
}
'--timeout=[The maximum number of seconds to wait for a reply from systemd-udevd.]' \
'--help[Print help text.]'
}
-
+
_udevadm_monitor(){
_arguments \
'--kernel[Print the kernel uevents.]' \
_udevadm_monitor(){
_arguments \
'--kernel[Print the kernel uevents.]' \
@@
-963,7
+978,7
@@
_udevadm_test-builtin(){
if (( CURRENT == 2 )); then
_arguments \
'--help[Print help text]' \
if (( CURRENT == 2 )); then
_arguments \
'--help[Print help text]' \
- '*::builtins:(blkid btrfs
firmware
hwdb input_id kmod path_id usb_id uaccess)'
+ '*::builtins:(blkid btrfs hwdb input_id kmod path_id usb_id uaccess)'
elif (( CURRENT == 3 )); then
_arguments \
'--help[Print help text]' \
elif (( CURRENT == 3 )); then
_arguments \
'--help[Print help text]' \