On 2022-Jul-08, Tom Lane wrote:

> The usual recommendation for pasting text into psql when it contains
> tabs is to start psql with the -n switch to disable tab completion.

"Bracketed paste" also solves this problem.  To enable this feature,
just edit your $HOME/.inputrc file to have the line
  set enable-bracketed-paste on
(then restart psql) which will cause the text passed to be used
literally, so the tabs won't invoke tab-completion.  There are other
side-effects: if you paste a multi-command string, the whole string is
added as a single entry in the history rather than being separate
entries.  I find this extremely useful; there are also claims of this
being more secure.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/


Reply via email to