xo / usql

Universal command-line interface for SQL databases
MIT License
9.07k stars 352 forks source link

Can't send tab character as input #472

Open dradtke opened 4 months ago

dradtke commented 4 months ago

In usql I am unable to execute a simple query like this (Oracle in this example):

select 'hello   world' from dual;

That is because the space between hello and world is a tab character, and usql overrides the tab key to provide completion. This also fails when pasting from the clipboard or sending it from another process, i.e. Kitty:

$ kitten @ send-text --match=recent:1 "select 'hello\tworld' from dual;"
# select 'helloworld' from dual;

This is annoying because I have some string fields that contain a tab character, and this makes it impossible to query against those fields.

Is it possible to disable completion, permanently or temporarily, to allow tab characters to be used as input? Or alternatively, find a way to provide completion results only when the Tab key is pressed, and not when \t is received?