Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: completion updates for openbsd 7.8
- X-seq: zsh-workers 54022
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: completion updates for openbsd 7.8
- Date: Sat, 01 Nov 2025 22:37:46 +0100
- Archived-at: <https://zsh.org/workers/54022>
- List-id: <zsh-workers.zsh.org>
The main thing of note here is that they added a watch(1) along the
lines of the watch command on Linux rather than the tty snooping watch
of FreeBSD.
Some of the other updates were new in 7.7.
Oliver
diff --git a/Completion/BSD/Command/_fw_update b/Completion/BSD/Command/_fw_update
index 84b5f808d..f09dcf61c 100644
--- a/Completion/BSD/Command/_fw_update
+++ b/Completion/BSD/Command/_fw_update
@@ -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)'
diff --git a/Completion/BSD/Command/_rcctl b/Completion/BSD/Command/_rcctl
index 457c3eb85..9b4df392e 100644
--- a/Completion/BSD/Command/_rcctl
+++ b/Completion/BSD/Command/_rcctl
@@ -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
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index d156f7778..9d240b42c 100644
--- a/Completion/Unix/Command/_sysctl
+++ b/Completion/Unix/Command/_sysctl
@@ -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]'
)
diff --git a/Completion/Unix/Command/_watch b/Completion/Unix/Command/_watch
index e12add520..a648e3e37 100644
--- a/Completion/Unix/Command/_watch
+++ b/Completion/Unix/Command/_watch
@@ -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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author