psql: do file completion for \gx
authorBruce Momjian <bruce@momjian.us>
Wed, 1 Apr 2020 03:01:33 +0000 (23:01 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 1 Apr 2020 03:01:33 +0000 (23:01 -0400)
This was missed when the feature was added.

Reported-by: Vik Fearing
Discussion: https://postgr.es/m/eca20529-0b06-b493-ee38-f071a75dcd5b@postgresfriends.org

Backpatch-through: 10

src/bin/psql/tab-complete.c

index d4aa4d22abe4b85c437720efdaf88ff6938bce1f..08431ded1d2a099496d2815e6edcd2f0d17d6c54 100644 (file)
@@ -3597,7 +3597,7 @@ psql_completion(const char *text, int start, int end)
        COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_functions, NULL);
    else if (TailMatchesCS1("\\sv*"))
        COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
-   else if (TailMatchesCS1("\\cd|\\e|\\edit|\\g|\\i|\\include|"
+   else if (TailMatchesCS1("\\cd|\\e|\\edit|\\g|\\gx|\\i|\\include|"
                            "\\ir|\\include_relative|\\o|\\out|"
                            "\\s|\\w|\\write|\\lo_import"))
    {