Skip to content

Commit 2b8c9e7

Browse files
committed
Set the application name, used for parsing readline's .inputrc -- dz
Massimo
1 parent be18519 commit 2b8c9e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bin/psql/psql.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.184 1999/07/19 02:27:10 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.185 1999/07/19 16:46:53 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -2876,6 +2876,13 @@ main(int argc, char **argv)
28762876
pqsignal(SIGINT, handle_sigint); /* control-C => cancel */
28772877
#ifdef USE_READLINE
28782878
settings.useReadline = 1;
2879+
{
2880+
/*
2881+
* Set the application name, used for parsing .inputrc -- dz
2882+
*/
2883+
char *progname = strrchr(argv[0], SEP_CHAR);
2884+
rl_readline_name = (progname ? progname+1 : argv[0]);
2885+
}
28792886
#endif
28802887
}
28812888
#ifdef PSQL_ALWAYS_GET_PASSWORDS

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy