summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-11-23 15:47:21 +0000
committerClint Adams <clint@users.sourceforge.net>2007-11-23 15:47:21 +0000
commitecfc1fc1e69736362548c711a8da9606ff786dd5 (patch)
tree0444511d393106c3a058f7bbff87d32bc926766a /Completion/Unix/Command
parent1b363034ce431c463646c40c9245b011e2f940ee (diff)
downloadzsh-ecfc1fc1e69736362548c711a8da9606ff786dd5.tar.gz
zsh-ecfc1fc1e69736362548c711a8da9606ff786dd5.tar.xz
zsh-ecfc1fc1e69736362548c711a8da9606ff786dd5.zip
Markus Waldeck: 24117: completion for uname.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_uname53
1 files changed, 53 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_uname b/Completion/Unix/Command/_uname
new file mode 100644
index 000000000..9b4663b8a
--- /dev/null
+++ b/Completion/Unix/Command/_uname
@@ -0,0 +1,53 @@
+#compdef uname
+
+typeset -A _uname_args
+
+if _pick_variant gnu="Free Soft" unix --version; then
+  case $LANG in
+    (de_DE.UTF-8)
+       _uname_args=(
+             all               "alle Informationen ausgeben"
+             kernel-name       "Namen des Kernels ausgeben"
+             nodename          "Netzwerknamen der Maschine ausgeben"
+             kernel-release    "Release-Nummer des Kernels ausgeben"
+             kernel-version    "Version des Kernels ausgeben"
+             machine           "Maschinentyp (Hardware) ausgeben"
+             processor         "Typ des Prozessors ausgeben (oder das Wort unknown)"
+             hardware-platform "Hardwareplattform ausgeben (oder das Wort unknown)"
+             operating-system  "Namen des Betriebssystems ausgeben"
+             help              "diese Hilfe anzeigen und beenden"
+             version           "Versionsinformation anzeigen und beenden"
+       )
+    ;;
+    (*)
+       _uname_args=(
+             all               "print all information"
+             kernel-name       "print the kernel name"
+             nodename          "print the network node hostname"
+             kernel-release    "print the kernel release"
+             kernel-version    "print the kernel version"
+             machine           "print the machine hardware name"
+             processor         "print the processor type or \"unknown\""
+             hardware-platform "print the hardware platform or \"unknown\""
+             operating-system  "print the operating system"
+             help              "display this help and exit"
+             version           "output version information and exit"
+       )
+    ;;
+  esac
+
+  _arguments \
+        '(--all -a)'{--all,-a}'['$_uname_args[all]']' \
+        '(--kernel-name -s)'{--kernel-name,-s}'['$_uname_args[kernel-name]']' \
+        '(--nodename -n)'{--nodename,-n}'['$_uname_args[nodename]']' \
+        '(--kernel-release -r)'{--kernel-release,-r}'['$_uname_args[kernel-release]']' \
+        '(--kernel-version -v)'{--kernel-version,-v}'['$_uname_args[kernel-version]']' \
+        '(--machine -m)'{--machine,-m}'['$_uname_args[machine]']' \
+        '(--processor -p)'{--processor,-p}'['$_uname_args[processor]']' \
+        '(--hardware-platform -i)'{--hardware-platform,-i}'['$_uname_args[hardware-platform]']' \
+        '(--operating-system -o)'{--operating-system,-o}'['$_uname_args[operating-system]']' \
+        '--help['$_uname_args[help]']' \
+        '--version['$_uname_args[version]']'
+else
+#       TODO add options of a NON GNU implementation
+fi