1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-29 16:25:35 +01:00

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.
This commit is contained in:
Frank Terbeck 2016-11-06 22:50:37 +01:00
parent c282abc6bd
commit 02fe884a11
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2016-11-06 Frank Terbeck <ft@bewatermyfriend.org>
* 39847: Util/check-tmux-state: Update helper function name
pattern
2016-11-05 Barton E. Schaefer <schaefer@zsh.org> 2016-11-05 Barton E. Schaefer <schaefer@zsh.org>
* unposted: Completion/compaudit: tweak replacement getent * unposted: Completion/compaudit: tweak replacement getent

View file

@ -58,7 +58,7 @@ __tmux-window-options
# Subcommand helper functions are defined like "function _tmux-foo() {" # Subcommand helper functions are defined like "function _tmux-foo() {"
# in the _tmux function definition file. # in the _tmux function definition file.
typeset -a supported_commands typeset -a supported_commands
supported_commands=( $( grep 'function *\<_tmux-' $func | supported_commands=( $( grep '^_tmux-[^(]*() *{$' $func |
sed -e 's,^.*\<_tmux-,,' -e 's,(.*$,,' ) ) sed -e 's,^.*\<_tmux-,,' -e 's,(.*$,,' ) )
# Ask tmux for available commands: # Ask tmux for available commands: