reedline icon indicating copy to clipboard operation
reedline copied to clipboard

better history suggestions

Open maxomatic458 opened this issue 1 year ago • 3 comments

I think it would be cool if the history suggestions wouldn't just work for full commands but also for sub-commands/strings.

e.g i run the command clear

in the shell i will get the history suggestion for it, but only if i didnt enter anything else yet.

echo "test"; c will not suggest clear here

this would be especially useful in cases like this:

scp path/to/some/file/ [email protected]:~

if someone would want to upload another file, they wouln't get a suggestion for the second part, so [email protected]:~ would need to fully by typed out again;

maxomatic458 avatar Feb 09 '24 00:02 maxomatic458

Sounds fancy but potentially confusing too.

fdncred avatar Feb 09 '24 01:02 fdncred

Your second example made me think about a nice history thing I configured in zsh and I use a lot: words history

It basically allows me to complete any words (argument) I ever passed to a command.. Here for example I typed in echo /tmp/fo then triggered that words history: image And I'm getting back all the arguments I ever used that starts with /tmp/fo (these files don't exist in my filesystem anymore, they're only mentioned in my looong history of commands)

Maybe nushell could have something like this?

bew avatar Feb 09 '24 02:02 bew

deleted comment

maxim-uvarov avatar Feb 09 '24 14:02 maxim-uvarov