File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,13 @@ MainLoop(FILE *source)
237
237
bool found_exit_or_quit = false;
238
238
bool found_q = false;
239
239
240
- /* Search for the words we recognize; must be first word */
240
+ /*
241
+ * The assistance words, help/exit/quit, must have no
242
+ * whitespace before them, and only whitespace after, with an
243
+ * optional semicolon. This prevents indented use of these
244
+ * words, perhaps as identifiers, from invoking the assistance
245
+ * behavior.
246
+ */
241
247
if (pg_strncasecmp (first_word , "help" , 4 ) == 0 )
242
248
{
243
249
rest_of_line = first_word + 4 ;
@@ -249,7 +255,6 @@ MainLoop(FILE *source)
249
255
rest_of_line = first_word + 4 ;
250
256
found_exit_or_quit = true;
251
257
}
252
-
253
258
else if (strncmp (first_word , "\\q" , 2 ) == 0 )
254
259
{
255
260
rest_of_line = first_word + 2 ;
You can’t perform that action at this time.
0 commit comments