summaryrefslogtreecommitdiffstats
path: root/tests/alias1.sub
blob: ed030312ee8659ef4f2ab33365bd0be1819ca270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
shopt -s expand_aliases

alias foo=echo

< /dev/null foo bar

< /dev/null x=value
echo $x

< /dev/null x=newvalue foo bar
echo $x

# problem reported by Vincent Lefevre
alias a="echo OK >&2"
a
> /dev/null a

${THIS_SH} -c 'shopt -s expand_aliases; alias a="echo OK >&2"
 a
 > /dev/null a'