diff options
author | Yuki Yugui Sonoda <yugui@yugui.jp> | 2015-11-02 22:07:33 +0000 |
---|---|---|
committer | David Chen <dzc@google.com> | 2015-11-02 23:19:34 +0000 |
commit | fd835ce601fd499e344d2a104c29d2af7c505638 (patch) | |
tree | cd3ffe6e9dcfb2914176cc453a3f7a0b6b73190c /scripts/zsh_completion | |
parent | 36e8c5b09ea48b03d79ad4ffd3c0bd8d6f7c02d6 (diff) |
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
Diffstat (limited to 'scripts/zsh_completion')
-rw-r--r-- | scripts/zsh_completion/_bazel | 2 |
1 files changed, 1 insertions, 1 deletions
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 |