In my fish function, I'm evaluating constructed commandline viaeval (commandline)
, specifically - I'm looking for some file name from fzf, and then analyze if commandline was prepended with vim
. If it was - instead of returning vim filename
to press enter afterwards, I just evaluate it, as I showed before.
The thing is that if I evaluate it, instead of pressing enter manually, it is not going to history - e.g. I can not see it as previous command by pressing up.
I tried set -x history (commandline) $history
after eval, but it shows me an error set: Tried to change the read-only variable “history”
Is there a way to manually add custom string (in my case commandline buffer) to history? thx.