From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17747 invoked by alias); 17 Apr 2014 14:17:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32559 Received: (qmail 17767 invoked from network); 17 Apr 2014 14:17:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Frank Terbeck To: Jasper Lievisse Adriaanse Cc: zsh-workers@zsh.org Subject: Re: More complete tmux support In-Reply-To: <20140417134303.GP20937@mail.jasper.la> (Jasper Lievisse Adriaanse's message of "Thu, 17 Apr 2014 15:43:03 +0200") References: <20140417134303.GP20937@mail.jasper.la> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Date: Thu, 17 Apr 2014 16:09:43 +0200 Message-ID: <878ur4xd20.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 Jasper Lievisse Adriaanse wrote: > Hi, Hey there! > We've had this patch for a long time in OpenBSD ports, it's to complete tmux > support. Great! I've been meaning to take a look for missing and changed features for ages... but. Laziness. :) However, something seems wrong with the patch. [...] > Subject: [PATCH] Add more complete tmux support. > > by pea@openbsd.org > --- > Completion/Unix/Command/_tmux | 1491 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 1491 insertions(+) [...] > diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux [...] > +# --- Sub-command functions --- > +# These *must* be called _tmux-*(); The description generation relies on > +# them being names that way. *No* other functions may match that pattern. > +# Other utility functions should be named __tmux-*() (see below). > +# > +# Another thing, the description generation needs, is handling of > +# $tmux_describe: If that parameter is non-empty, the sub-command function > +# should only print a description of the sub-command it handles and return > +# immidiately after doing so. > +# > +# To add support for a new sub-command, you only have to add a new > +# _tmux-() function below (preferably alphabetically sorted), that > +# behaves like described above; and add a alias->command pair in the > +# _tmux_aliasmap associative array above (if the comand in fact has an > +# alias). The rest should just work[tm]. [...] I don't understand why this comment is added here. [...] > +function _tmux-send-prefix() { > + [[ -n ${tmux_describe} ]] && print "Send the prefix key to a window" && return > + local -a args > + args=('-t[Choose a target pane]:panes:__tmux-panes') > + _arguments ${args} > +} [...] There are multiple pre-existing function added as well. [...] > +_tmux > +#compdef tmux > + > +# tmux completion for zsh . > +# > +# Configuration: > +# And then here the file starts all over again? Would be great, if you could take a look at what went wrong here and resend. Regards, Frank -- In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925