]> granicus.if.org Git - postgresql/commit
psql: Add quit/help behavior/hint, for other tool portability
authorBruce Momjian <bruce@momjian.us>
Thu, 1 Feb 2018 13:30:43 +0000 (08:30 -0500)
committerBruce Momjian <bruce@momjian.us>
Thu, 1 Feb 2018 13:30:43 +0000 (08:30 -0500)
commitdf9f599bc6f14307252ac75ea1dc997310da5ba6
treeb34920fa4e643fe7009873b814008bd5f7b6220f
parenteab30cc6b55dc03589bda13bc76b12d7142d5686
psql:  Add quit/help behavior/hint, for other tool portability

Issuing 'quit'/'exit' in an empty psql buffer exits psql.  Issuing
'quit'/'exit' in a non-empty psql buffer alone on a line with no prefix
whitespace issues a hint on how to exit.

Also add similar 'help' hints for 'help' in a non-empty psql buffer.

Reported-by: Everaldo Canuto
Discussion: https://postgr.es/m/flat/CALVFHFb-C_5_94hueWg6Dd0zu7TfbpT7hzsh9Zf0DEDOSaAnfA%40mail.gmail.com

Author: original author Robert Haas, modified by me
src/bin/psql/mainloop.c