I can retrieve a command history from sqlline 1.9.0 using !history, for example:
0: jdbc:phoenix:> !history
139 16:45:44 SELECT DISTINCT BIOBANKSUBJECTID FROM VCF;
...
145 20:06:20 !/139
146 20:06:30 !rerun 139
147 20:07:00 !rerun !139
I'd like to be able to rerun a command as in Unix, where I type !139 to get that previous command to execute. That doesn't seem to work in sqlline, nor do the things I tried in commands 145-147. Is there any way to rerun a command besides copy and paste?

To rerun a command from sqlline's command history, follow these steps:
Open sqlline and connect to your database.
Type !history and press Enter. This will display a list of all the commands you have entered in the current session, along with their corresponding line numbers.
Identify the line number of the command you want to rerun.
Type !<line_number> and press Enter. For example, if the line number of the command is 5, you would type !5 and press Enter.
The command will be executed again.
Note: If you want to edit the command before rerunning it, use the !edit <line_number> command instead. This will open the command in your default text editor, allowing you to make any necessary changes before running it again.