xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.71k stars 1.63k forks source link

Can not correctly paste multi line SQL statement under the sqlplus tool through XTERMJS #4371

Closed rysinal closed 1 year ago

rysinal commented 1 year ago

I used the clipboard to paste the same SQL statement, and it pasted normally under vi editor, but under sqlplus there was an unexpected number at the end, I guess this number is the line number

select owner,table_name,
num_rows
from dba_tables

Details

Steps to reproduce

sqlfix

jerch commented 1 year ago

Most cmdline REPLs use NL as a command separator, thus cannot be fed from multiline commands directly. Most likely you'd have to resemble the command into one big line, or into smaller pieces. Yes the numbers look like sqlplus answers line input with a line number, but since you entered the lines "at once", the screen state gets scrambled and numbers are appended at the end. This is not an issue of the terminal (as you showed with vim), but how your app tries to interact with you. If anything, ask in sqlplus help forums.