mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
abbr -e: use same exit code as set -e if abbr doesn't exist
Which is 4, apparently.. (builtin_set.cpp returns ENV_NOT_FOUND) here. This was previously hardcoded to our 121, which used to be what builtins used for invalid arguments. 4 is pretty arbitrary but at least this is more consistent.
This commit is contained in:
parent
6ea7aa8a00
commit
6c9065e9ef
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ function __fish_abbr_erase --no-scope-shadowing
|
|||
|
||||
if not set -q $abbr_var_name
|
||||
printf ( _ "%s %s: No abbreviation named %s\n" ) abbr --erase $escaped_name >&2
|
||||
return 121
|
||||
return 4 # like `set -e doesnt_exist`
|
||||
end
|
||||
|
||||
set -e $abbr_var_name
|
||||
|
|
Loading…
Reference in a new issue