It depends on the situation.
return ends the current scope (ie. alias or event) and returns control to the calling scope (ie. an alias), whereas
halt just stops execution of the script outright.
ie.:
alias moo1 {
echo 4 -a before
moo2
echo 4 -a after
}
alias moo2 {
[color:blue]return[/color]
echo -a you'll never see this
}
Typing
/moo1 will echo:
before
afterHowever if you change the
return to
halt it will only echo:
beforeTypically you'd use
halt when a 'fatal' error occurs in your script, and you'd use
return just to break out of an alias.