mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
54022: completion updates for openbsd 7.8
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2025-11-03 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 54022: Completion/BSD/Command/_fw_update,
|
||||
Completion/BSD/Command/_rcctl, Completion/Unix/Command/_sysctl,
|
||||
Completion/Unix/Command/_watch: completion updates for openbsd 7.8
|
||||
|
||||
* 54020: configure.ac: add library for network support on Haiku OS
|
||||
|
||||
* 54019: configure.ac, Makefile.in, Src/params.c, Test/ztst.zsh,
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
_arguments -s -S -A "-*" \
|
||||
'(*)-a[install or update firmware for all drivers]' \
|
||||
'-d[delete drivers instead of adding them]' \
|
||||
'-D+[specify location of dmesg output used to determine needed firmware]:path [/var/run/dmesg.boot]:_files' \
|
||||
'-F[download firmware only]' \
|
||||
'-l[list drivers without installing]' \
|
||||
'-n[dry run]' \
|
||||
'-p+[use the firmware at specified path]: : _alternative
|
||||
"urls\:url\:_urls"
|
||||
"directories\:path\:_directories"' \
|
||||
'*-v[verbose output]' \
|
||||
'(-a)*:driver:'
|
||||
'(-a)*:driver:compadd $(_call_program drivers $words[1] -l)'
|
||||
|
||||
@@ -18,7 +18,8 @@ lsarg=(
|
||||
|
||||
if [[ $service == "rcctl" ]]; then
|
||||
_arguments -C \
|
||||
'-d[print debug information]' \
|
||||
'(-q)-d[print debug information]' \
|
||||
'(-d)-q[only display the script name and errors]' \
|
||||
'-f[forcibly start the daemon]' \
|
||||
':subcommand:('"$actions ${${${+words[(r)-[df]]}#1}/0/$subcmds}"\) \
|
||||
'*:: :->subcmd' && return
|
||||
@@ -48,4 +49,5 @@ case $service in
|
||||
${(~j:|:)actions}|disable|enable)
|
||||
_arguments "*:service to ${words[2]}:_services"
|
||||
;;
|
||||
*) _default ;;
|
||||
esac
|
||||
|
||||
@@ -36,6 +36,11 @@ case $OSTYPE in
|
||||
'(- :)'{-V,--version}'[display version info and exit]' \
|
||||
"*:sysctl variable:_multi_parts -i -S = -q $delimiter sysctlvars"
|
||||
;;
|
||||
(free|open)bsd*)
|
||||
args+=(
|
||||
'-f+[specify file of name/value pairs to process first]:file:_files'
|
||||
)
|
||||
;|
|
||||
freebsd<14->.*)
|
||||
args+=(
|
||||
'-F[print the format of the variable]'
|
||||
@@ -53,7 +58,6 @@ case $OSTYPE in
|
||||
;|
|
||||
freebsd<10->.*)
|
||||
args+=(
|
||||
'-f+[specify file of name/value pairs to process first]:file:_files'
|
||||
'-T[display only variables that are settable via loader]'
|
||||
'-W[display only writable variables that are not statistical]'
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@ case $variant in
|
||||
'(-b --beep)'{-b,--beep}'[beep on non-zero command exit]' \
|
||||
'(-c --color)'{-c,--color}'[interpret ANSI color/style sequences]' \
|
||||
'(-d --differences)'{-d-,--differences=-}'[highlight changes between updates]::how to highlight:(permanent)' \
|
||||
'(-e --errexit)'{-e,--errexit}'[freeze updates on non-zero command exit]' \
|
||||
'(-e --errexit)'{-e,--errexit}'[pause updating if command exits with a non-zero exit code]' \
|
||||
'(-g --chgexit)'{-g,--chgexit}'[exit on command output change]' \
|
||||
'(-n --interval)'{-n+,--interval=}'[specify update interval]:update interval (seconds) [2]' \
|
||||
'(-p --precise)'{-p,--precise}'[run command at precise intervals]' \
|
||||
@@ -23,23 +23,32 @@ case $variant in
|
||||
'(-t --no-title)'{-t,--no-title}'[disable header]' \
|
||||
'(-w --no-wrap)'{-w,--no-wrap}'[disable line wrapping]' \
|
||||
'(-x --exec)'{-x,--exec}'[pass command to exec(2) instead of `sh -c`]' \
|
||||
'(-)*::: :->cmd' \
|
||||
&& ret=0
|
||||
|
||||
[[ $state == cmd ]] &&
|
||||
if
|
||||
(( CURRENT == 1 )) &&
|
||||
[[ $words[1] == (\"|\'|\$\')* ]] &&
|
||||
[[ -z $opt_args[(i)(-x|--exec)] ]]
|
||||
then
|
||||
_cmdstring && ret=0
|
||||
else
|
||||
_normal -p watch && ret=0
|
||||
fi
|
||||
;;
|
||||
'(-)*::: :->cmd' && ret=0
|
||||
;;
|
||||
openbsd*)
|
||||
_arguments -s -A "-*" \
|
||||
'(-l -w)-c[highlight changed characters]' \
|
||||
'-e[pause updating if command exits with a non-zero exit code]' \
|
||||
'(-c -w)-l[highlight changed lines]' \
|
||||
'-s[set the interval between updates]: :_numbers -d 1 -u seconds interval' \
|
||||
'(-c -l)-w[highlight changed words]' \
|
||||
'-x[pass command to execl(3) instead of `sh -c`]' \
|
||||
'(-)*::: :->cmd' && ret=0
|
||||
;;
|
||||
# watch(1) has completely different semantics on freebsd compared to linux, hence:
|
||||
(freebsd*|dragonfly*) _watch-snoop "$@" && ret=0 ;;
|
||||
(*) _default && ret=0 ;;
|
||||
esac
|
||||
|
||||
[[ $state == cmd ]] &&
|
||||
if
|
||||
(( CURRENT == 1 )) &&
|
||||
[[ $words[1] == (\"|\'|\$\')* ]] &&
|
||||
[[ -z $opt_args[(i)(-x|--exec)] ]]
|
||||
then
|
||||
_cmdstring && ret=0
|
||||
else
|
||||
_normal -p watch && ret=0
|
||||
fi
|
||||
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user