Fish shell: how to exit on error (bash set -e) Fish shell: how to exit on error (bash set -e) bash bash

Fish shell: how to exit on error (bash set -e)


There's no equivalent of this in fish. https://github.com/fish-shell/fish-shell/issues/805 spend a little time discussing what a fishy version of this might look like.

If the script is short, prefixing each line with and might not be too bad:

cp file1 file2and rm file1and echo File moved