File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,13 @@ MainLoop(FILE *source)
237237 bool found_exit_or_quit = false;
238238 bool found_q = false;
239239
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+ */
241247 if (pg_strncasecmp (first_word , "help" , 4 ) == 0 )
242248 {
243249 rest_of_line = first_word + 4 ;
@@ -249,7 +255,6 @@ MainLoop(FILE *source)
249255 rest_of_line = first_word + 4 ;
250256 found_exit_or_quit = true;
251257 }
252-
253258 else if (strncmp (first_word , "\\q" , 2 ) == 0 )
254259 {
255260 rest_of_line = first_word + 2 ;
You can’t perform that action at this time.
0 commit comments