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') |