diff --git a/b2/boom.c b/b2/boom.c index 1f81871..2cd6df4 100644 --- a/b2/boom.c +++ b/b2/boom.c @@ -132,6 +132,7 @@ static void usage(const char *name) int main(int argc, char **argv) { void (*process)(const char *name) = parse_hierarchy; + int query = 0; int i; dollar = unique("$"); @@ -170,13 +171,15 @@ int main(int argc, char **argv) process = parse_symbols; } else if (!strcmp(argv[i], "-q")) { process = add_var; + query = 1; } else if (!strcmp(argv[i], "-Q")) { process = add_var; + query = 1; select_parts = 1; } else usage(*argv); } - if (vars) + if (query) do_substitutions(); return 0; }