mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 15:05:27 +08:00
alias: print error msgs to stderr
This commit is contained in:
parent
3e473b9f37
commit
80b2eb94f1
@ -35,10 +35,10 @@ function alias --description 'Creates a function wrapping a command'
|
|||||||
|
|
||||||
# sanity check
|
# sanity check
|
||||||
if test -z "$name"
|
if test -z "$name"
|
||||||
printf ( _ "%s: Name cannot be empty\n") alias
|
printf ( _ "%s: Name cannot be empty\n") alias >&2
|
||||||
return 1
|
return 1
|
||||||
else if test -z "$body"
|
else if test -z "$body"
|
||||||
printf ( _ "%s: Body cannot be empty\n") alias
|
printf ( _ "%s: Body cannot be empty\n") alias >&2
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user