Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _sysctl for OpenBSD
- X-seq: zsh-workers 17961
- From: Armin Wolfermann <aw@xxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _sysctl for OpenBSD
- Date: Sat, 23 Nov 2002 16:20:10 +0100
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Index: _sysctl
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_sysctl,v
retrieving revision 1.4
diff -u -r1.4 _sysctl
--- _sysctl	8 Oct 2001 16:22:40 -0000	1.4
+++ _sysctl	23 Nov 2002 15:17:58 -0000
@@ -33,4 +33,13 @@
       '(-n -w -p -a *)-A[list all in table form]' \
       '(-n -p -a -A)*:sysctl variable:_files -W /proc/sys'
   ;;
+  openbsd*)
+  : ${(A)_cache_sysctlvars:=${${(f)"$(sysctl -a)"}%% *}}
+  _arguments -s -A "-*" \
+    '(-w -A *)-a[list all string and integer variables]' \
+    '(-w -a *)-A[list all known variables]' \
+    '(-w)-n[show only values]' \
+    '(-a -A -n)-w[write variable]' \
+    '(-a -A)*:sysctl variable:_multi_parts ${words[(r)-w]:+-S=} -i . _cache_sysctlvars'
+    ;;
 esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author