about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/User/_look18
1 files changed, 18 insertions, 0 deletions
diff --git a/Completion/User/_look b/Completion/User/_look
new file mode 100644
index 000000000..14d6285b6
--- /dev/null
+++ b/Completion/User/_look
@@ -0,0 +1,18 @@
+#compdef look
+
+local context state line
+typeset -A opt_args
+
+_arguments -s \
+  '-t+[termination character]:termination character:' \
+  '-f[case insensitive]' \
+  '-d[dictionary order]' \
+  ':string:->string'
+
+case "$state" in
+string)
+  if [[ -n "$PREFIX" ]]; then
+    compadd - $(_call values $words[1] $PREFIX)
+  fi
+  ;;
+esac