From 5a98e318b03d78d8d24028c3ff6dd56952d58ac2 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 18 Dec 2016 13:24:57 +0100 Subject: 40210: Add support modern FreeBSD and drop support for FreeBSD < 5 --- ChangeLog | 5 +++++ Completion/Unix/Command/_sysctl | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e76df39dc..f08e5ab5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-12-18 Baptiste Daroussin + + * 40210: Completion/Unix/Command/_sysctl: Add support modern + FreeBSD and drop support for FreeBSD < 5 + 2016-12-18 Baptiste Daroussin * 40209: Completion/BSD/Command/_chflags: Fix typo in chflags diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl index cf88c3dc1..c5bb26eb0 100644 --- a/Completion/Unix/Command/_sysctl +++ b/Completion/Unix/Command/_sysctl @@ -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]' \ -- cgit 1.4.1