Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 131

How to add entry to fish shell history?

$
0
0

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.


Viewing all articles
Browse latest Browse all 131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>