Add indicator for in quote or in query to prompt.
This commit is contained in:
parent
2d7aacb052
commit
440279e803
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.35 1996/11/26 07:38:28 bryanh Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.36 1996/11/30 03:41:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1272,6 +1272,13 @@ MainLoop(PsqlSettings * settings, FILE * source)
|
||||
line = strdup(query);
|
||||
query[0] = '\0';
|
||||
} else {
|
||||
sprintf(settings->prompt, "%s%s", PQdb(settings->db), PROMPT);
|
||||
if (in_quote)
|
||||
settings->prompt[strlen(settings->prompt)-3] = '\'';
|
||||
else if (query[0] != '\0' && !querySent)
|
||||
settings->prompt[strlen(settings->prompt)-3] = '-';
|
||||
else
|
||||
settings->prompt[strlen(settings->prompt)-3] = '=';
|
||||
line = GetNextLine(settings->prompt, source);
|
||||
if (interactive && settings->useReadline && line != NULL)
|
||||
add_history(line); /* save non-empty lines in history */
|
||||
|
Loading…
Reference in New Issue
Block a user