mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-02-05 08:50:28 +01:00
21 lines
698 B
Text
21 lines
698 B
Text
#compdef upower
|
|
_enumerate_objects() {
|
|
local expl
|
|
local -a objects
|
|
objects=( ${(f)"$(
|
|
_call_program upower-enumerate-objects \
|
|
upower -e
|
|
)"} )
|
|
_wanted objects expl "object path" \
|
|
compadd -a objects -d objects
|
|
}
|
|
|
|
_arguments \
|
|
"(--enumerate -e)"{--enumerate,-e}"[Enumerate objects paths for devices]" \
|
|
"(--dump -d)"{--dump,-d}"[Dump all parameters for all objects]" \
|
|
"(--monitor -m)"{--monitor,-m}"[Monitor activity from the power daemon]" \
|
|
"--monitor-detail""[Monitor with detail]" \
|
|
"(--show-info -i)"{--show-info,-i}"[Show information about object path]"":::_enumerate_objects" \
|
|
"(--version -v)"{--version,-v}"[Print version of client and daemon"] \
|
|
|
|
compdef _upower upower
|