From 35d3418aebfb5cc32cada19668fcbafc1b7ad162 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 23 May 2010 19:54:03 +0000 Subject: users/15078: completion for zsh-mime-handler --- Completion/Zsh/Function/.distfiles | 4 ++++ Completion/Zsh/Function/_zsh-mime-handler | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 Completion/Zsh/Function/.distfiles create mode 100644 Completion/Zsh/Function/_zsh-mime-handler (limited to 'Completion') 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 -- cgit 1.4.1