about summary refs log tree commit diff
path: root/Completion/Unix/Command/_awk
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-13 16:08:35 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-13 16:08:35 +0000
commit547adf2021e2e57e421d27e5620170a8751d4274 (patch)
treec86db928284b551f8616bb76fc5263b8f9a8148b /Completion/Unix/Command/_awk
parent8a30b5f0df3809bb70c28b786ac30e5cdd169693 (diff)
downloadzsh-547adf2021e2e57e421d27e5620170a8751d4274.tar.gz
zsh-547adf2021e2e57e421d27e5620170a8751d4274.tar.xz
zsh-547adf2021e2e57e421d27e5620170a8751d4274.zip
25018: Omari Norman: completion for awk, join, sort
Diffstat (limited to 'Completion/Unix/Command/_awk')
-rw-r--r--Completion/Unix/Command/_awk21
1 files changed, 21 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_awk b/Completion/Unix/Command/_awk
new file mode 100644
index 000000000..da748e9be
--- /dev/null
+++ b/Completion/Unix/Command/_awk
@@ -0,0 +1,21 @@
+#compdef awk
+
+# completions for awk
+# This only aims to complete POSIX awk options, as described in
+# awk(P). Most awk implementations, such as gawk and mawk, will have
+# additional options that this does not complete. Also, currently
+# this completion does not allow everything that POSIX allows. For
+# example, awk(P) states that the user may specify assignments
+# without using the -v option; this does not support that.
+#
+# In addition, the "program text" completion is not perfect. For
+# instance, type "awk -" and then hit tab. You will be presented
+# both with the dashed options and with the "program text" option.
+# Fixing this is beyond my current _arguments expertise--help
+# appreciated.
+
+_arguments -S -s '-F[define input field separator to be an extended regular expression]:extended regular expression:' \
+    '*-v[assign values to variables]:assignment:' \
+    '(1)-f[program file]:program file:_files' \
+    '1:program text:' \
+    '*:input files:_files'