Commit 1e9c4b44 authored by jkummerow's avatar jkummerow Committed by Commit bot

[tools] Fix tools/bash-completion.sh for bool flags and harmony features

NOTRY=true

Review URL: https://codereview.chromium.org/1518663002

Cr-Commit-Position: refs/heads/master@{#32740}
parent f07dd5da
......@@ -39,12 +39,16 @@ _v8_flag() {
cur="${COMP_WORDS[COMP_CWORD]}"
defines=$(cat $v8_source/src/flag-definitions.h \
| grep "^DEFINE" \
| grep -v "DEFINE_implication" \
| grep -v "DEFINE_IMPLICATION" \
| sed -e 's/_/-/g'; \
cat $v8_source/src/flag-definitions.h \
| grep "^ V(harmony_" \
| sed -e 's/^ V/DEFINE-BOOL/' \
| sed -e 's/_/-/g')
targets=$(echo "$defines" \
| sed -ne 's/^DEFINE-[^(]*(\([^,]*\).*/--\1/p'; \
echo "$defines" \
| sed -ne 's/^DEFINE-bool(\([^,]*\).*/--no\1/p'; \
| sed -ne 's/^DEFINE-BOOL(\([^,]*\).*/--no\1/p'; \
cat $v8_source/src/d8.cc \
| grep "strcmp(argv\[i\]" \
| sed -ne 's/^[^"]*"--\([^"]*\)".*/--\1/p')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment