File: _upower

package info (click to toggle)
upower 1.91.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,660 kB
  • sloc: ansic: 13,134; python: 5,310; xml: 1,636; sh: 33; makefile: 26
file content (22 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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 \
	"(--battery -b)"{--battery,-b}"[Dump all parameters for battery objects]" \
	"(--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