Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] zsh iconvconfig completion



Hi,

Below is zsh completions for the iconvconfig(8) command which is part
of the GNU C library. The command itself is not that often used but it
complements the iconv(1) completions in tree already and locale(1) /
localedef(1) completions which I'm about to send next.

http://man7.org/linux/man-pages/man8/iconvconfig.8.html

Tested on RHEL 7.

---
 Completion/Unix/Command/_iconvconfig | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 Completion/Unix/Command/_iconvconfig

diff --git a/Completion/Unix/Command/_iconvconfig b/Completion/Unix/Command/_iconvconfig
new file mode 100644
index 0000000..5afb10a
--- /dev/null
+++ b/Completion/Unix/Command/_iconvconfig
@@ -0,0 +1,13 @@
+#compdef iconvconfig
+
+local exargs="-? --help --usage -V --version"
+
+_arguments -S -s \
+    "($exargs)--nostdlib[do not search system directory]" \
+    "(-o --output= $exargs)"{-o+,--output=}'[specify output file]:output file:_files' \
+    "($exargs)--prefix=[specify system dir prefix]:prefix:_files" \
+    '(- *)'{-\?,--help}'[display help information]' \
+    '(- *)--usage[display a short usage message]' \
+    '(- *)'{-V,--version}'[print program version]' \
+    '*:directory:_files -/' \
+    && return 0

Thanks,

-- 
Marko Myllynen



Messages sorted by: Reverse Date, Date, Thread, Author