Skip to content

Commit 1782750

Browse files
author
Oliver Kiddle
committed
54022: completion updates for openbsd 7.8
1 parent 62c6326 commit 1782750

File tree

5 files changed

+39
-18
lines changed

5 files changed

+39
-18
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
2025-11-03 Oliver Kiddle <[email protected]>
22

3+
* 54022: Completion/BSD/Command/_fw_update,
4+
Completion/BSD/Command/_rcctl, Completion/Unix/Command/_sysctl,
5+
Completion/Unix/Command/_watch: completion updates for openbsd 7.8
6+
37
* 54020: configure.ac: add library for network support on Haiku OS
48

59
* 54019: configure.ac, Makefile.in, Src/params.c, Test/ztst.zsh,

Completion/BSD/Command/_fw_update

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
_arguments -s -S -A "-*" \
44
'(*)-a[install or update firmware for all drivers]' \
55
'-d[delete drivers instead of adding them]' \
6+
'-D+[specify location of dmesg output used to determine needed firmware]:path [/var/run/dmesg.boot]:_files' \
67
'-F[download firmware only]' \
8+
'-l[list drivers without installing]' \
79
'-n[dry run]' \
810
'-p+[use the firmware at specified path]: : _alternative
911
"urls\:url\:_urls"
1012
"directories\:path\:_directories"' \
1113
'*-v[verbose output]' \
12-
'(-a)*:driver:'
14+
'(-a)*:driver:compadd $(_call_program drivers $words[1] -l)'

Completion/BSD/Command/_rcctl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ lsarg=(
1818

1919
if [[ $service == "rcctl" ]]; then
2020
_arguments -C \
21-
'-d[print debug information]' \
21+
'(-q)-d[print debug information]' \
22+
'(-d)-q[only display the script name and errors]' \
2223
'-f[forcibly start the daemon]' \
2324
':subcommand:('"$actions ${${${+words[(r)-[df]]}#1}/0/$subcmds}"\) \
2425
'*:: :->subcmd' && return
@@ -48,4 +49,5 @@ case $service in
4849
${(~j:|:)actions}|disable|enable)
4950
_arguments "*:service to ${words[2]}:_services"
5051
;;
52+
*) _default ;;
5153
esac

Completion/Unix/Command/_sysctl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ case $OSTYPE in
3636
'(- :)'{-V,--version}'[display version info and exit]' \
3737
"*:sysctl variable:_multi_parts -i -S = -q $delimiter sysctlvars"
3838
;;
39+
(free|open)bsd*)
40+
args+=(
41+
'-f+[specify file of name/value pairs to process first]:file:_files'
42+
)
43+
;|
3944
freebsd<14->.*)
4045
args+=(
4146
'-F[print the format of the variable]'
@@ -53,7 +58,6 @@ case $OSTYPE in
5358
;|
5459
freebsd<10->.*)
5560
args+=(
56-
'-f+[specify file of name/value pairs to process first]:file:_files'
5761
'-T[display only variables that are settable via loader]'
5862
'-W[display only writable variables that are not statistical]'
5963
)

Completion/Unix/Command/_watch

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ case $variant in
1414
'(-b --beep)'{-b,--beep}'[beep on non-zero command exit]' \
1515
'(-c --color)'{-c,--color}'[interpret ANSI color/style sequences]' \
1616
'(-d --differences)'{-d-,--differences=-}'[highlight changes between updates]::how to highlight:(permanent)' \
17-
'(-e --errexit)'{-e,--errexit}'[freeze updates on non-zero command exit]' \
17+
'(-e --errexit)'{-e,--errexit}'[pause updating if command exits with a non-zero exit code]' \
1818
'(-g --chgexit)'{-g,--chgexit}'[exit on command output change]' \
1919
'(-n --interval)'{-n+,--interval=}'[specify update interval]:update interval (seconds) [2]' \
2020
'(-p --precise)'{-p,--precise}'[run command at precise intervals]' \
@@ -23,23 +23,32 @@ case $variant in
2323
'(-t --no-title)'{-t,--no-title}'[disable header]' \
2424
'(-w --no-wrap)'{-w,--no-wrap}'[disable line wrapping]' \
2525
'(-x --exec)'{-x,--exec}'[pass command to exec(2) instead of `sh -c`]' \
26-
'(-)*::: :->cmd' \
27-
&& ret=0
28-
29-
[[ $state == cmd ]] &&
30-
if
31-
(( CURRENT == 1 )) &&
32-
[[ $words[1] == (\"|\'|\$\')* ]] &&
33-
[[ -z $opt_args[(i)(-x|--exec)] ]]
34-
then
35-
_cmdstring && ret=0
36-
else
37-
_normal -p watch && ret=0
38-
fi
39-
;;
26+
'(-)*::: :->cmd' && ret=0
27+
;;
28+
openbsd*)
29+
_arguments -s -A "-*" \
30+
'(-l -w)-c[highlight changed characters]' \
31+
'-e[pause updating if command exits with a non-zero exit code]' \
32+
'(-c -w)-l[highlight changed lines]' \
33+
'-s[set the interval between updates]: :_numbers -d 1 -u seconds interval' \
34+
'(-c -l)-w[highlight changed words]' \
35+
'-x[pass command to execl(3) instead of `sh -c`]' \
36+
'(-)*::: :->cmd' && ret=0
37+
;;
4038
# watch(1) has completely different semantics on freebsd compared to linux, hence:
4139
(freebsd*|dragonfly*) _watch-snoop "$@" && ret=0 ;;
4240
(*) _default && ret=0 ;;
4341
esac
4442

43+
[[ $state == cmd ]] &&
44+
if
45+
(( CURRENT == 1 )) &&
46+
[[ $words[1] == (\"|\'|\$\')* ]] &&
47+
[[ -z $opt_args[(i)(-x|--exec)] ]]
48+
then
49+
_cmdstring && ret=0
50+
else
51+
_normal -p watch && ret=0
52+
fi
53+
4554
return ret

0 commit comments

Comments
 (0)