psql: Add COMPLETE_WITH_FILES and COMPLETE_WITH_GENERATOR macros.
authorMasahiko Sawada <msawada@postgresql.org>
Thu, 25 Sep 2025 21:28:01 +0000 (14:28 -0700)
committerMasahiko Sawada <msawada@postgresql.org>
Thu, 25 Sep 2025 21:28:01 +0000 (14:28 -0700)
commit76418a0b676234d2b570a1138c1a43a2018c416f
treeb5caf44afa1e5162e194592b2250f58289170d06
parent02c4bc88302a750a2aed20e6f17885bda872d228
psql: Add COMPLETE_WITH_FILES and COMPLETE_WITH_GENERATOR macros.

While most tab completions in match_previous_words() use
COMPLETE_WITH* macros to wrap rl_completion_matches(), some direct
calls to rl_completion_matches() still remained.

This commit introduces COMPLETE_WITH_FILES and COMPLETE_WITH_GENERATOR
macros to replace these direct calls, enhancing both code consistency
and readability.

Author: Yugo Nagata <nagata@sraoss.co.jp>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/20250605100835.b396f9d656df1018f65a4556@sraoss.co.jp
src/bin/psql/tab-complete.in.c