summary refs log tree commit diff
path: root/Util/check-tmux-state
diff options
context:
space:
mode:
authorFrank Terbeck <ft@bewatermyfriend.org>2016-11-06 22:50:37 +0100
committerFrank Terbeck <ft@bewatermyfriend.org>2016-11-06 23:18:28 +0100
commit02fe884a11e814192981d32f7a67a3ee450ff70a (patch)
treeec80ad032bc48cdb1c62b4819c560f86ff4a8114 /Util/check-tmux-state
parentc282abc6bd9bbc6dc204d217d8e94ea4565e68ca (diff)
downloadzsh-02fe884a11e814192981d32f7a67a3ee450ff70a.tar.gz
zsh-02fe884a11e814192981d32f7a67a3ee450ff70a.tar.xz
zsh-02fe884a11e814192981d32f7a67a3ee450ff70a.zip
39847: Update helper function name pattern
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.
Diffstat (limited to 'Util/check-tmux-state')
-rw-r--r--Util/check-tmux-state2
1 files changed, 1 insertions, 1 deletions
diff --git a/Util/check-tmux-state b/Util/check-tmux-state
index 4cba36070..2c6106203 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: