在bash中,你可以在脚本中使用
set -e
来在发生错误时退出:set -e
cd unexisting-folder
echo "this line will not be printed"
但是在fish shell中,set -e
用于删除变量:
set FOO bar
set -e FOO
echo {$FOO} # prints newline
Bash中set -e
的Fish等效命令是什么?