Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: tools/bash-completion.sh

Issue 1518663002: [tools] Fix tools/bash-completion.sh for bool flags and harmony features (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bash-completion.sh
diff --git a/tools/bash-completion.sh b/tools/bash-completion.sh
index 6e324246d69d4bf844154ad95a8ff70060a9371f..5b9f7f5073e2031d94a4d1b6ac4785d816c62d28 100755
--- a/tools/bash-completion.sh
+++ b/tools/bash-completion.sh
@@ -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_" \
Jakob Kummerow 2015/12/10 09:44:36 Harmony feature flags are generated by a macro, so
+ | sed -e 's/^ V/DEFINE-BOOL/' \
Jakob Kummerow 2015/12/10 09:44:36 ...but we can use "sed" as a poor man's macro expa
| 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'; \
Jakob Kummerow 2015/12/10 09:44:36 Remember https://codereview.chromium.org/259573003
cat $v8_source/src/d8.cc \
| grep "strcmp(argv\[i\]" \
| sed -ne 's/^[^"]*"--\([^"]*\)".*/--\1/p')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698