mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Add \ir command to psql.
\ir is short for "include relative"; when used from a script, the supplied pathname will be interpreted relative to the input file, rather than to the current working directory. Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further cleanup by me.
This commit is contained in:
@ -735,7 +735,7 @@ psql_completion(char *text, int start, int end)
|
||||
"\\dF", "\\dFd", "\\dFp", "\\dFt", "\\dg", "\\di", "\\dl", "\\dL",
|
||||
"\\dn", "\\do", "\\dp", "\\drds", "\\ds", "\\dS", "\\dt", "\\dT", "\\dv", "\\du",
|
||||
"\\e", "\\echo", "\\ef", "\\encoding",
|
||||
"\\f", "\\g", "\\h", "\\help", "\\H", "\\i", "\\l",
|
||||
"\\f", "\\g", "\\h", "\\help", "\\H", "\\i", "\\ir", "\\l",
|
||||
"\\lo_import", "\\lo_export", "\\lo_list", "\\lo_unlink",
|
||||
"\\o", "\\p", "\\password", "\\prompt", "\\pset", "\\q", "\\qecho", "\\r",
|
||||
"\\set", "\\sf", "\\t", "\\T",
|
||||
@ -2874,6 +2874,7 @@ psql_completion(char *text, int start, int end)
|
||||
strcmp(prev_wd, "\\e") == 0 || strcmp(prev_wd, "\\edit") == 0 ||
|
||||
strcmp(prev_wd, "\\g") == 0 ||
|
||||
strcmp(prev_wd, "\\i") == 0 || strcmp(prev_wd, "\\include") == 0 ||
|
||||
strcmp(prev_wd, "\\ir") == 0 || strcmp(prev_wd, "\\include_relative") == 0 ||
|
||||
strcmp(prev_wd, "\\o") == 0 || strcmp(prev_wd, "\\out") == 0 ||
|
||||
strcmp(prev_wd, "\\s") == 0 ||
|
||||
strcmp(prev_wd, "\\w") == 0 || strcmp(prev_wd, "\\write") == 0
|
||||
|
Reference in New Issue
Block a user