[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add -- to zsh compadd



As discussed in IRC, see attached patch :)

-- 
http://www.the-compiler.org | me _at_ the _minus_ compiler _dot_ org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
From 6b53aa0f825a1ddba3f5864628a80b377babc225 Mon Sep 17 00:00:00 2001
From: Florian Bruhin <git _at_ the _minus_ compiler _dot_ org>
Date: Wed, 11 Jun 2014 21:05:57 +0200
Subject: [PATCH] Add -- to zsh compadd.

Before, the completion arguments returned by herbstclient were interpreted as
options to compadd if they started with a - (e.g. herbstclient
tab_status<tab>).
---
 share/_herbstclient | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/_herbstclient b/share/_herbstclient
index c7c1098..c31c479 100644
--- a/share/_herbstclient
+++ b/share/_herbstclient
@@ -8,7 +8,7 @@
 _herbstclient() {
     local IFS=$'\n'
     # compadd is documented in zshcompwid(1)
-    compadd -QS '' "$@" $(herbstclient -q complete_shell "$((CURRENT-2))" 
"${(@)words[@]:1}")
+    compadd -QS '' -- "$@" $(herbstclient -q complete_shell "$((CURRENT-2))" 
"${(@)words[@]:1}")
 }
 
 # compdef is documented in zshcompsys(1)
-- 
2.0.0

Attachment: pgpJtDRlyfQ1y.pgp
Description: PGP signature