psql readline Tab insert tab
Hello,
how to make psql (readline) to insert tab when Tab is pressed? E.g. for
pasting. I know, there is -n option. But then the history is not
accessible.
I have tried
$if psql
Control-I: "\t"
Control-A: complete
$endif
in my ~/.inputrc. But when I press Tab psql freezes until I press Ctrl+C.
Regards
HG
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Hans Ginzel wrote:
how to make psql (readline) to insert tab when Tab is pressed? E.g. for
pasting. I know, there is -n option. But then the history is not
accessible.I have tried
$if psql
Control-I: "\t"
Control-A: complete
$endif
in my ~/.inputrc. But when I press Tab psql freezes until I press Ctrl+C.
Probably an endless loop.
It could be done by adding the following lines to your ~/.inputrc file:
$if Psql
TAB: tab-insert
$endif
Yours,
Laurenz Albe
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Hans Ginzel wrote:
how to make psql (readline) to insert tab when Tab is pressed? E.g. for
pasting. I know, there is -n option. But then the history is not
accessible.I have tried
$if psql
Control-I: "\t"
Control-A: complete
$endif
in my ~/.inputrc. But when I press Tab psql freezes until I press
Ctrl+C.Probably an endless loop.
It could be done by adding the following lines to your ~/.inputrc file:
$if Psql
TAB: tab-insert
$endif
Great! Thank you very much. Could this be added as note to the -n option
of the page http://www.postgresql.org/docs/current/static/app-psql.html,
please?
Regards
Hans
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Dne 29.05.2015 13:18, Hans Ginzel napsal:
Hans Ginzel wrote:
how to make psql (readline) to insert tab when Tab is pressed?
E.g. for pasting. I know, there is -n option. But then the history is
not accessible. I have tried $if psql Control-I: "t" Control-A: complete
$endif in my ~/.inputrc. But when I press Tab psql freezes until I press
Ctrl+C.
Probably an endless loop. It could be done by adding the
following lines to your ~/.inputrc file: $if Psql TAB: tab-insert
$endif
Great! Thank you very much. Could this be added as note to
the -n option
of the page
http://www.postgresql.org/docs/current/static/app-psql.html,
please?
And/or could there be added an option pset paste like :set
paste/nopaste in Vim, please?
http://vimdoc.sourceforge.net/htmldoc/options.html#%27paste%27
Regards
Show quoted text
Hans
Hans Ginzel wrote:
how to make psql (readline) to insert tab when Tab is pressed? E.g. for
pasting. I know, there is -n option. But then the history is not
accessible.
It could be done by adding the following lines to your ~/.inputrc file:
$if Psql
TAB: tab-insert
$endif
Great! Thank you very much. Could this be added as note to the -n option
of the page http://www.postgresql.org/docs/current/static/app-psql.html,
please?
Would that be worth an addition to the documentation?
Yours,
Laurenz Albe
Attachments:
0001-Document-how-to-disable-tab-completion-with-readline.patchapplication/octet-stream; name=0001-Document-how-to-disable-tab-completion-with-readline.patchDownload+9-1
On 6/1/15 7:00 AM, Albe Laurenz wrote:
Hans Ginzel wrote:
how to make psql (readline) to insert tab when Tab is pressed? E.g. for
pasting. I know, there is -n option. But then the history is not
accessible.It could be done by adding the following lines to your ~/.inputrc file:
$if Psql
TAB: tab-insert
$endifGreat! Thank you very much. Could this be added as note to the -n option
of the page http://www.postgresql.org/docs/current/static/app-psql.html,
please?Would that be worth an addition to the documentation?
There is already a section about this on the psql man page. (Look for
"disable-completion".)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Peter Eisentraut wrote:
On 6/1/15 7:00 AM, Albe Laurenz wrote:
Hans Ginzel wrote:
how to make psql (readline) to insert tab when Tab is pressed? E.g. for
pasting. I know, there is -n option. But then the history is not
accessible.
It could be done by adding the following lines to your ~/.inputrc file:
$if Psql
TAB: tab-insert
$endif
Great! Thank you very much. Could this be added as note to the -n option
of the page http://www.postgresql.org/docs/current/static/app-psql.html,
please?
Would that be worth an addition to the documentation?
There is already a section about this on the psql man page. (Look for
"disable-completion".)
Right, I didn't notice that.
Yours,
Laurenz Albe
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers