diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-05-23 19:54:03 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-05-23 19:54:03 +0000 |
commit | 35d3418aebfb5cc32cada19668fcbafc1b7ad162 (patch) | |
tree | cee9d7fa990295cea6ebfb7a3da8c5ec03e8ef22 /Completion/Zsh/Function | |
parent | b7d9912f8b44d159426526d2857273f57a11b67a (diff) | |
download | zsh-35d3418aebfb5cc32cada19668fcbafc1b7ad162.tar.gz zsh-35d3418aebfb5cc32cada19668fcbafc1b7ad162.tar.xz zsh-35d3418aebfb5cc32cada19668fcbafc1b7ad162.zip |
users/15078: completion for zsh-mime-handler
Diffstat (limited to 'Completion/Zsh/Function')
-rw-r--r-- | Completion/Zsh/Function/.distfiles | 4 | ||||
-rw-r--r-- | Completion/Zsh/Function/_zsh-mime-handler | 9 |
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 |