chrisant996 / clink

Bash's powerful command line editing in cmd.exe
https://chrisant996.github.io/clink/
GNU General Public License v3.0
3.63k stars 143 forks source link

Preview the whole line expanded instead of individual expansions at cursor #420

Closed Destroy666x closed 1 year ago

Destroy666x commented 1 year ago

Would be nice to have a command or something to check the whole line expanded before sending/expanding it to make sure it's fully correct, in case it refers to a long line (which currently are shortened with ... to fit single line below) or few expansions like !-1 & !-2 & !-3 & !-4.

I don't know what the best way of showing the preview would be considering it can be long, but I guess something similar to long completion list with scrollable --More?-- would fit.

chrisant996 commented 1 year ago

@Destroy666x there are many commands for that listed in the Clink Commands section under the Bindable Commands topic. Look for the command names that begin with "clink-expand-".

They don't "preview", they do the expansion. One can undo (Ctrl-z) after, to revert back to the original unexpanded text.

I'll add a mention of a couple of the expansion commands in the Using History Expansion section.

chrisant996 commented 1 year ago

Added mention in the docs in commit 1312bc1f19bc06654654aa8c161fb79c06566d63.

Destroy666x commented 1 year ago

Ah, I am aware of these and they were reasonably findable in the documentation compared to some other things, but for some reason I thought Ctrl + Z isn't working well for them. I recall trying it with few commands and it not working, but I tried it again now and it's fine and easy enough indeed. So I'll close it until the issue shows up again, if it was a clink issue in the 1st place as I was also configuring e.g. ConEmu at that time.