about summary refs log tree commit diff
path: root/Completion/Unix/Command/_getconf
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:51:35 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:51:35 +0000
commit0c57eacae64d83414f3119acb308822b85fa415e (patch)
tree1b74601a415c0a29d897455dcb898ac7ab3e2ea6 /Completion/Unix/Command/_getconf
parent1290609b087e8c0b7cbfa7810d98b6a75be51d14 (diff)
downloadzsh-0c57eacae64d83414f3119acb308822b85fa415e.tar.gz
zsh-0c57eacae64d83414f3119acb308822b85fa415e.tar.xz
zsh-0c57eacae64d83414f3119acb308822b85fa415e.zip
moved from Completion/User/_getconf
Diffstat (limited to 'Completion/Unix/Command/_getconf')
-rw-r--r--Completion/Unix/Command/_getconf37
1 files changed, 37 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_getconf b/Completion/Unix/Command/_getconf
new file mode 100644
index 000000000..613632c1d
--- /dev/null
+++ b/Completion/Unix/Command/_getconf
@@ -0,0 +1,37 @@
+#compdef getconf
+
+local expl ret=1
+
+if [[ CURRENT -eq 2 ]]; then
+  _tags syswideconfig pathconfig standardsconfig
+
+  while _tags; do
+    _requested -V syswideconfig expl 'systemwide configuration variables' \
+      compadd -S '' ARG_MAX BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX \
+          BC_STRING_MAX CHILD_MAX COLL_WEIGHTS_MAX EXPR_NEST_MAX LINE_MAX \
+	  NGROUPS_MAX OPEN_MAX RE_DUP_MAX STREAM_MAX TZNAME_MAX && ret=0
+
+    _requested -V standardsconfig \
+        expl 'system-standards configuration variables' \
+      compadd -S '' _POSIX_CHILD_MAX _POSIX_LINK_MAX \
+          _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX \
+	  _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX \
+	  _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VERSION \
+	  POSIX2_BC_BASE_MAX POSIX2_BC_DIM_MAX POSIX2_BC_SCALE_MAX \
+	  POSIX2_BC_STRING_MAX POSIX2_COLL_WEIGHTS_MAX POSIX2_EXPR_NEST_MAX \
+	  POSIX2_LINE_MAX POSIX2_RE_DUP_MAX POSIX2_VERSION POSIX2_C_BIND \
+	  POSIX2_C_DEV POSIX2_FORT_DEV POSIX2_FORT_RUN POSIX2_LOCALEDEF \
+	  POSIX2_SW_DEV _XOPEN_VERSION && ret=0
+
+    _requested pathconfig &&
+        while _next_label -V pathconfig expl 'system path configuration variables'; do
+          compadd "$expl[@]" -S '' PIPE_BUF _POSIX_CHOWN_RESTRICTED \
+                                   _POSIX_NO_TRUNC _POSIX_VDISABLE && ret=0
+          compadd "$expl[@]" -S ' ' LINK_MAX MAX_CANON MAX_INPUT NAME_MAX \
+                                    PATH_MAX PIPE_BUF && ret=0
+        done
+    (( ret )) || return 0
+  done
+else
+  _files -/
+fi