I want to run the previous command with part of it replaced. In bash, I can use the history expansion feature: ^x^y
runs the previous command again, except with x
replaced by y
. I tried it in fish and it gave the following error:
^x^y
Expected a command, but instead found a redirection
Are there any ways to re-run a command with modifications in fish?
^
is used to redirect standard error; I don't know if there's a way of editing the last command (short of editing it manually).