zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Update helper function name pattern
@ 2016-11-06 21:50 Frank Terbeck
  0 siblings, 0 replies; only message in thread
From: Frank Terbeck @ 2016-11-06 21:50 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-06 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-06 21:50 [PATCH] Update helper function name pattern Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).