From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21801 invoked by alias); 6 Nov 2016 21:57:58 -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: 39847 Received: (qmail 3914 invoked from network); 6 Nov 2016 21:57:58 -0000 X-Qmail-Scanner-Diagnostics: from smtprelay01.ispgateway.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.67.29.23):SA:0(0.0/5.0):. Processed in 0.466426 secs); 06 Nov 2016 21:57:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: ft@bewatermyfriend.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-workers@zsh.org Subject: [PATCH] Update helper function name pattern Date: Sun, 6 Nov 2016 22:50:37 +0100 Message-Id: <20161106215037.5997-1-ft@bewatermyfriend.org> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Df-Sender: NDMwNDQ0 In 580698bc71, Oliver updated a whole bunch of options in a number of completions. While at it, he also changed a bit of coding style, to better adhere to Etc/zsh-development-guide — among those changes is to convert "function foobar() {" function definitions to "foobar() {". This broke Util/check-tmux-state so that it couldn't detect any supported tmux sub-commands within _tmux anymore. This updates the regular expression that is used in the script to match and list these function definitions. --- Util/check-tmux-state | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/check-tmux-state b/Util/check-tmux-state index 4cba360..2c61062 100644 --- a/Util/check-tmux-state +++ b/Util/check-tmux-state @@ -58,7 +58,7 @@ __tmux-window-options # Subcommand helper functions are defined like "function _tmux-foo() {" # in the _tmux function definition file. typeset -a supported_commands -supported_commands=( $( grep 'function *\<_tmux-' $func | +supported_commands=( $( grep '^_tmux-[^(]*() *{$' $func | sed -e 's,^.*\<_tmux-,,' -e 's,(.*$,,' ) ) # Ask tmux for available commands: -- 2.9.3