Index: clang-query/Query.cpp =================================================================== --- clang-query/Query.cpp +++ clang-query/Query.cpp @@ -45,7 +45,7 @@ "Set whether to print bindings as diagnostics,\n" " " "AST pretty prints or AST dumps.\n" - " quit " + " quit, q " "Terminates the query session.\n\n"; return true; } Index: clang-query/QueryParser.cpp =================================================================== --- clang-query/QueryParser.cpp +++ clang-query/QueryParser.cpp @@ -166,6 +166,7 @@ .Case("let", PQK_Let) .Case("m", PQK_Match, /*IsCompletion=*/false) .Case("match", PQK_Match) + .Case("q", PQK_Quit, /*IsCompletion=*/false) .Case("quit", PQK_Quit) .Case("set", PQK_Set) .Case("unlet", PQK_Unlet) Index: unittests/clang-query/QueryParserTest.cpp =================================================================== --- unittests/clang-query/QueryParserTest.cpp +++ unittests/clang-query/QueryParserTest.cpp @@ -51,6 +51,9 @@ QueryRef Q = parse("quit"); ASSERT_TRUE(isa(Q)); + Q = parse("q"); + ASSERT_TRUE(isa(Q)); + Q = parse("quit me"); ASSERT_TRUE(isa(Q)); EXPECT_EQ("unexpected extra input: ' me'", cast(Q)->ErrStr);