*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.144 2005/06/09 15:27:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.145 2005/06/09 23:28:09 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
success = false;
}
+ if (pset.dirname)
+ pfree(pset.dirname);
+ pset.dirname = pg_strdup(dir);
+ canonicalize_path(pset.dirname);
+
if (opt)
free(opt);
}
success = saveHistory(fname ? fname : "/dev/tty");
if (success && !quiet && fname)
- printf(_("Wrote history to file \"%s\".\n"), fname);
+ printf(gettext("Wrote history to file \"%s/%s\".\n"),
+ pset.dirname ? pset.dirname : ".", fname);
if (!fname)
putchar('\n');
free(fname);
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/settings.h,v 1.23 2005/01/01 05:43:08 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/settings.h,v 1.24 2005/06/09 23:28:10 momjian Exp $
*/
#ifndef SETTINGS_H
#define SETTINGS_H
int sversion; /* backend server version */
const char *progname; /* in case you renamed psql */
char *inputfile; /* for error reporting */
+ char *dirname; /* current directory for \s display */
+
unsigned lineno; /* also for error reporting */
bool timing; /* enable timing of all queries */