Simulate fc
command in fish
Install with Fisher:
fisher install lengyijun/fc-fish
# edit the last command
fc
fc -1
# edit the second last command
fc -2
# view last 16 command
fc -l
# view last 16 command in reverse order
fc -l -r
# edit last 3 command
fc -3 -1
# fish doesn't have (positive) key for history
fc 15 22
# -s not supported
fc -s "foo"
# zsh specific parameter
fc -fl
fc -ld
In fish, we can use upparrow alt+e
or upparrow alt+v
to edit previous command
- fishbang - Bash bang command for fish