Replies: 4 comments 4 replies
-
Hi! The forward-arrow completion comes from prompt-toolkit, rather than from mycli. It looks like that project is open to a customization file, but hasn't implemented it yet: https://python-prompt-toolkit.readthedocs.io/en/stable/pages/advanced_topics/key_bindings.html#processing-inputrc . It may not be possible or wise for mycli to override the arrow binding. I would prefer tab as well! What else is "frustrating"? |
Beta Was this translation helpful? Give feedback.
-
Thanks @rolandwalker, totally agree we shouldn't fight the tools we're using, rather help to improve them if possible. One thing I miss from 'regular' terminal is Ctrl-r for searching backwards in commands. The specific feature is 1) Ctrl-r for 'something' I roughly remember, 2) see something 'close' to what I want, 3) hammer Ctrl-r repeatedly to 'find again' backwards in the command history. e.g. go back beyond the first exact match. I can move my hand to the arrow keys and start paging up and down in the history from the point where the search 'landed', but again, my fingers are already on ctrl-r and are ready to 'find again' ... Sounds silly now I type it out, but you know how it goes... your fingers know how to move around until suddenly you have to switch contexts, move you hand 6cm right... what a pain! ;-) In my shell (bash) I have this cryptic comment: # Make multiline comand history behave:
shopt -s cmdhist
shopt -s lithist which generally feels right (even though I'm not 100% sure how it works or what it's doing). I recently added Oh.. a big annoyance is if I copy an SQL out of mycli (select it and expect to paste it with middle mouse button), it includes line breaks (and the prompt continuation characters, even when the query is a single 'line' that just happens to wrap around). When I copy a long (single line) command from the terminal, in contrast, it's a single line when I paste it. Finally, the autocomplete is so good when it works, it becomes annoying when it doesn't work. For example, in this query: SELECT x.sp_id, A.sp_id, B.sp_id FROM cons x
LEFT JOIN coh A ON x.sp_id = A.sp_id AND A.coh_id = "fb_1"
LEFT JOIN coh B ON x.sp_id = B.sp_id AND B.coh
-> _id = "fb_2"
WHERE x.gn = 'FUCA2'
AND (
A.sp_id IS NOT NULL OR
B.sp_id IS NOT NULL
) LIMIT 50; (Literally just a random query I'm working on), If I type This last one feels very minor ;-) Thanks again for the excellent tool! |
Beta Was this translation helpful? Give feedback.
-
A couple of relevant PRs |
Beta Was this translation helpful? Give feedback.
-
OK, I don't have fzf installed, but ctrl-r doesn't search back in the history if I repeatedly press ctrl-r in mycli like it does in bash. I guess this is a bug for me? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There are a few 'nits' I have with the cli that I can't easily figure out how to configure away... e.g., I don't want to hit
forward-arrow
to complete a suggestion, but rathertab
, which feels more familiar and keeps my fingers on the home keys... Is re-configuring that even possible in mycli? (sorry for being noob... in general I like the tool a lot, there are a just a few small things that just get frustrating after a while).Beta Was this translation helpful? Give feedback.
All reactions