Skip to content

Commit

Permalink
Make subcommand completion in zsh work on Mac OS X
Browse files Browse the repository at this point in the history
Avoid depending on extended regexp of gawk

--
Change-Id: I28a57c249c5b8078b410c365f51f400bcdc27997
Reviewed-on: https://bazel-review.googlesource.com/#/c/2240
MOS_MIGRATED_REVID=106877966
  • Loading branch information
yugui authored and davidzchen committed Nov 2, 2015
1 parent 36e8c5b commit fd835ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/zsh_completion/_bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd835ce

Please sign in to comment.