From fd835ce601fd499e344d2a104c29d2af7c505638 Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Mon, 2 Nov 2015 22:07:33 +0000 Subject: Make subcommand completion in zsh work on Mac OS X Avoid depending on extended regexp of gawk -- Change-Id: I28a57c249c5b8078b410c365f51f400bcdc27997 Reviewed-on: https://bazel-review.googlesource.com/#/c/2240 MOS_MIGRATED_REVID=106877966 --- scripts/zsh_completion/_bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/zsh_completion') diff --git a/scripts/zsh_completion/_bazel b/scripts/zsh_completion/_bazel index c4ab8c919a..3999d6db91 100644 --- a/scripts/zsh_completion/_bazel +++ b/scripts/zsh_completion/_bazel @@ -282,7 +282,7 @@ _get_commands() { # descriptions. if _bazel_cmd_list=("${(@f)$(b help | awk ' /Available commands/ { command=1; } -/ \w+\s+.+/ { if (command) { printf "%s:", $1; for (i=2; i<=NF; i++) printf "%s ", $i; print "" } } +/ [-a-z]+[ \t]+.+/ { if (command) { printf "%s:", $1; for (i=2; i<=NF; i++) printf "%s ", $i; print "" } } /^$/ { command=0; }')}"); then _store_cache BAZEL_commands _bazel_cmd_list fi -- cgit v1.2.3