mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 11:01:13 +02:00
37534: completion for OpenBSD's cu, fw_update and rcctl utils
This commit is contained in:
parent
5eae5b58b1
commit
82210cb954
4 changed files with 63 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2016-01-10 Eric Cook <llua@gmx.com>
|
||||
* 37534: Matthew Martin: Completion/BSD/Command/_cu,
|
||||
Completion/BSD/Command/_fw_update, Completion/BSD/Command/_rcctl
|
||||
|
||||
2016-01-08 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Jun T.: 37515: Src/Modules/pcre.c, Test/V07pcre.ztst: multibyte
|
||||
|
|
7
Completion/BSD/Command/_cu
Normal file
7
Completion/BSD/Command/_cu
Normal file
|
@ -0,0 +1,7 @@
|
|||
#compdef cu
|
||||
|
||||
_arguments -s -A '-*' \
|
||||
'-d[do not block waiting for a carrier to be detected]' \
|
||||
'-l[line to use]:line:(/dev/cuaU#<->(%))' \
|
||||
'-s[line speed]:line speed:(75 110 300 1200 2400 4800 9600 19200 38400 57600 115200)' \
|
||||
'(-*)1:host:'
|
10
Completion/BSD/Command/_fw_update
Normal file
10
Completion/BSD/Command/_fw_update
Normal file
|
@ -0,0 +1,10 @@
|
|||
#compdef fw_update
|
||||
|
||||
_arguments -s -S -A "-*" \
|
||||
'(*)-a[install or update firmware for all drivers]' \
|
||||
'-d[delete drivers instead of adding them]' \
|
||||
'-i[display information]' \
|
||||
'-n[dry run]' \
|
||||
'-p[use the firmware at specified path]:path:' \
|
||||
'*-v[verbose output]' \
|
||||
'(-a)*:driver:'
|
42
Completion/BSD/Command/_rcctl
Normal file
42
Completion/BSD/Command/_rcctl
Normal file
|
@ -0,0 +1,42 @@
|
|||
#compdef rcctl
|
||||
|
||||
local context state line
|
||||
local -a actions subcmds variables
|
||||
|
||||
actions=(check reload restart start stop)
|
||||
subcmds=(disable enable get getdef ls order set)
|
||||
variables=(class flags status timeout user)
|
||||
|
||||
if [[ $service == "rcctl" ]]; then
|
||||
_arguments -C \
|
||||
'-d[print debug information]' \
|
||||
'-f[forcibly start the daemon]' \
|
||||
':subcommand:('"$actions ${${${+words[(r)-[df]]}#1}/0/$subcmds}"\) \
|
||||
'*:: :->subcmd' && return
|
||||
service="$words[1]"
|
||||
fi
|
||||
|
||||
case $service in
|
||||
get|getdef)
|
||||
_arguments \
|
||||
':service:_services' \
|
||||
':variable:compadd -a variables'
|
||||
;;
|
||||
ls)
|
||||
_arguments ':display a list of services and daemons matching:(all faulty off on started stopped)'
|
||||
;;
|
||||
order)
|
||||
_arguments \
|
||||
':service to start first:_services'
|
||||
'*:service to start next:_services'
|
||||
;;
|
||||
set)
|
||||
_arguments \
|
||||
':service:_services' \
|
||||
':variable:compadd -a variables' \
|
||||
'*:argument:'
|
||||
;;
|
||||
${(~j:|:)actions}|disable|enable)
|
||||
_arguments "*:service to $words[2]:_services"
|
||||
;;
|
||||
esac
|
Loading…
Reference in a new issue