about summary refs log tree commit diff
path: root/Completion/Unix/Command/_look
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_look')
-rw-r--r--Completion/Unix/Command/_look16
1 files changed, 16 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_look b/Completion/Unix/Command/_look
new file mode 100644
index 000000000..94a90bc3f
--- /dev/null
+++ b/Completion/Unix/Command/_look
@@ -0,0 +1,16 @@
+#compdef look
+
+local curcontext="$curcontext" state line expl ret=1
+typeset -A opt_args
+
+_arguments -C -s \
+  '-t+[termination character]:termination character:' \
+  '-f[case insensitive]' \
+  '-d[dictionary order]' \
+  ':string:->string' \
+  ':dictionary file:_files' && ret=0
+
+[[ -n "$state" && ! -prefix - ]] && _wanted values expl 'word prefix' \
+    compadd - $(_call_program words $words[1] '"$PREFIX"') && return
+
+return ret