freebsd-skq/bin/sh/tests/parser/alias15.0
Jilles Tjoelker 48f49aac53 sh: Allow aliases to force alias substitution on the following word.
If an alias's value ends with a space or tab, the next word is also
checked for aliases.

This is a POSIX feature. It is useful with utilities like command and
nohup (alias them to themselves followed by a space).
2014-01-26 21:19:33 +00:00

13 lines
174 B
Plaintext

# $FreeBSD$
f_echoanddo() {
printf '%s\n' "$*"
"$@"
}
alias echoanddo='f_echoanddo '
alias alias0='echo test2'
eval 'echoanddo echo test1'
eval 'echoanddo alias0'
exit 0