I hope that you are joking since you just have to press `Alt` + `S` to rerun the previous command with sudo in fish-shell:
> `Alt` + `S` Prepends sudo to the current commandline. If the commandline is empty, prepend sudo to the last commandline.
https://fishshell.com/docs/current/interactive.html#shared-b...