about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-05-23 19:54:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-05-23 19:54:03 +0000
commit35d3418aebfb5cc32cada19668fcbafc1b7ad162 (patch)
treecee9d7fa990295cea6ebfb7a3da8c5ec03e8ef22 /Completion/Zsh
parentb7d9912f8b44d159426526d2857273f57a11b67a (diff)
downloadzsh-35d3418aebfb5cc32cada19668fcbafc1b7ad162.tar.gz
zsh-35d3418aebfb5cc32cada19668fcbafc1b7ad162.tar.xz
zsh-35d3418aebfb5cc32cada19668fcbafc1b7ad162.zip
users/15078: completion for zsh-mime-handler
Diffstat (limited to 'Completion/Zsh')
-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