about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Zsh/Function/.distfiles4
-rw-r--r--Completion/Zsh/Function/_zsh-mime-handler9
2 files changed, 13 insertions, 0 deletions
diff --git a/Completion/Zsh/Function/.distfiles b/Completion/Zsh/Function/.distfiles
new file mode 100644
index 000000000..3d13eb6fa
--- /dev/null
+++ b/Completion/Zsh/Function/.distfiles
@@ -0,0 +1,4 @@
+DISTFILES_SRC='
+.distfiles
+zsh-mime-handler
+'
diff --git a/Completion/Zsh/Function/_zsh-mime-handler b/Completion/Zsh/Function/_zsh-mime-handler
new file mode 100644
index 000000000..c11e5aba9
--- /dev/null
+++ b/Completion/Zsh/Function/_zsh-mime-handler
@@ -0,0 +1,9 @@
+#compdef zsh-mime-handler
+
+# zsh-mime-handler -l is supposed to print out the command line
+# with quoting to turn it into a full executable line.  So
+# we need to use shell splitting to turn it into words and
+# then unquoting on those words.
+words=(${(Q)${(z)"$(zsh-mime-handler -l ${words[2,-1]})"}})
+
+_normal