summary refs log tree commit diff
path: root/Functions/Completion/__hash
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Completion/__hash')
-rw-r--r--Functions/Completion/__hash13
1 files changed, 13 insertions, 0 deletions
diff --git a/Functions/Completion/__hash b/Functions/Completion/__hash
new file mode 100644
index 000000000..bd43eb967
--- /dev/null
+++ b/Functions/Completion/__hash
@@ -0,0 +1,13 @@
+#function hash
+
+if [[ -mword 1 -*d* ]]; then
+  if [[ -string 1 '=' ]]; then
+    pfiles -g '*(-/)'
+  else
+    complist -n -q -S '='
+  fi
+elif [[ -string 1 '=' ]]; then
+  files -g '*(*)' '*(-/)'
+else
+  complist -m -q -S '='
+fi