File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 3
3
*
4
4
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
5
5
*
6
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.144 2005/06/09 15:27:26 momjian Exp $
6
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.145 2005/06/09 23:28:09 momjian Exp $
7
7
*/
8
8
#include "postgres_fe.h"
9
9
#include "command.h"
@@ -276,6 +276,11 @@ exec_command(const char *cmd,
276
276
success = false;
277
277
}
278
278
279
+ if (pset .dirname )
280
+ pfree (pset .dirname );
281
+ pset .dirname = pg_strdup (dir );
282
+ canonicalize_path (pset .dirname );
283
+
279
284
if (opt )
280
285
free (opt );
281
286
}
@@ -661,7 +666,8 @@ exec_command(const char *cmd,
661
666
success = saveHistory (fname ? fname : "/dev/tty" );
662
667
663
668
if (success && !quiet && fname )
664
- printf (_ ("Wrote history to file \"%s\".\n" ), fname );
669
+ printf (gettext ("Wrote history to file \"%s/%s\".\n" ),
670
+ pset .dirname ? pset .dirname : "." , fname );
665
671
if (!fname )
666
672
putchar ('\n' );
667
673
free (fname );
Original file line number Diff line number Diff line change 3
3
*
4
4
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
5
5
*
6
- * $PostgreSQL: pgsql/src/bin/psql/settings.h,v 1.23 2005/01/01 05:43:08 momjian Exp $
6
+ * $PostgreSQL: pgsql/src/bin/psql/settings.h,v 1.24 2005/06/09 23:28:10 momjian Exp $
7
7
*/
8
8
#ifndef SETTINGS_H
9
9
#define SETTINGS_H
@@ -49,6 +49,8 @@ typedef struct _psqlSettings
49
49
int sversion ; /* backend server version */
50
50
const char * progname ; /* in case you renamed psql */
51
51
char * inputfile ; /* for error reporting */
52
+ char * dirname ; /* current directory for \s display */
53
+
52
54
unsigned lineno ; /* also for error reporting */
53
55
54
56
bool timing ; /* enable timing of all queries */
You can’t perform that action at this time.
0 commit comments