alias: print error msgs to stderr

This commit is contained in:
Jason 2021-04-13 22:01:30 +09:00 committed by Fabian Homborg
parent 3e473b9f37
commit 80b2eb94f1

View file

@ -35,10 +35,10 @@ function alias --description 'Creates a function wrapping a command'
# sanity check
if test -z "$name"
printf ( _ "%s: Name cannot be empty\n") alias
printf ( _ "%s: Name cannot be empty\n") alias >&2
return 1
else if test -z "$body"
printf ( _ "%s: Body cannot be empty\n") alias
printf ( _ "%s: Body cannot be empty\n") alias >&2
return 1
end