1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-20 06:56:05 +02:00

40210: Add support modern FreeBSD and drop support for FreeBSD < 5

This commit is contained in:
Baptiste Daroussin 2016-12-18 13:24:57 +01:00 committed by Daniel Shahaf
parent 8ae20a8589
commit 5a98e318b0
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2016-12-18 Baptiste Daroussin <bapt@FreeBSD.org>
* 40210: Completion/Unix/Command/_sysctl: Add support modern
FreeBSD and drop support for FreeBSD < 5
2016-12-18 Baptiste Daroussin <bapt@gandi.net>
* 40209: Completion/BSD/Command/_chflags: Fix typo in chflags

View File

@ -10,10 +10,10 @@ case $OSTYPE in
'-W[display only writable variables that are not statistical]'
)
;|
dragonfly*|freebsd<8->.*)
dragonfly*|freebsd*)
args+=( "-i[silently exit if variable doesn't exist]" )
;|
*freebsd<5->.*|freebsd4.[4-9]*)
freebsd*)
local -a sysctlvars
sysctlvars=( $(_call_program sysctl-variables sysctl -aN) )
_arguments -s -S -A "-*" $args \
@ -31,7 +31,7 @@ case $OSTYPE in
'(-o)-x[show opaques as well (entire values)]' \
'(-a)*:sysctl variable:_multi_parts -i . sysctlvars'
;;
freebsd[0-4].*|darwin*|dragonfly*)
darwin*|dragonfly*)
: ${(A)_cache_sysctlvars:=${${$(sysctl -A 2>/dev/null):#[^a-z]*}%%:*}}
_arguments -s -A "-*" $args \
'(-w -X *)-a[list all]' \