diff options
author | jilles <jilles@FreeBSD.org> | 2014-01-24 16:40:51 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-01-24 16:40:51 +0000 |
commit | 5b4046f60ff315a314f4701a931290673b290ab0 (patch) | |
tree | d6e682f9ba5ef0ef4b1fb8b97f04a0c2e7954236 /bin/sh/tests/builtins | |
parent | 2c9e5787396110f19fad35555faec78015a6ffd8 (diff) | |
download | FreeBSD-src-5b4046f60ff315a314f4701a931290673b290ab0.zip FreeBSD-src-5b4046f60ff315a314f4701a931290673b290ab0.tar.gz |
sh: Solve the alias recursion problem in a less hackish way.
Add the space to avoid alias recursion when the alias is expanded, not when
it is added.
As a result, displaying an alias via command -v, command -V or type no
longer erroneously appends a space. Adjust the tests so they now require
this bug to be absent.
Diffstat (limited to 'bin/sh/tests/builtins')
-rw-r--r-- | bin/sh/tests/builtins/command3.0.stdout | 2 | ||||
-rw-r--r-- | bin/sh/tests/builtins/command5.0.stdout | 2 | ||||
-rw-r--r-- | bin/sh/tests/builtins/command6.0.stdout | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/tests/builtins/command3.0.stdout b/bin/sh/tests/builtins/command3.0.stdout index 239c53f..67b8691 100644 --- a/bin/sh/tests/builtins/command3.0.stdout +++ b/bin/sh/tests/builtins/command3.0.stdout @@ -4,4 +4,4 @@ true fun break if -alias foo='bar ' +alias foo=bar diff --git a/bin/sh/tests/builtins/command5.0.stdout b/bin/sh/tests/builtins/command5.0.stdout index 4cb2b11..523f7b2 100644 --- a/bin/sh/tests/builtins/command5.0.stdout +++ b/bin/sh/tests/builtins/command5.0.stdout @@ -5,4 +5,4 @@ fun is a shell function break is a special shell builtin if is a shell keyword { is a shell keyword -foo is an alias for bar +foo is an alias for bar diff --git a/bin/sh/tests/builtins/command6.0.stdout b/bin/sh/tests/builtins/command6.0.stdout index df4d647..3180207 100644 --- a/bin/sh/tests/builtins/command6.0.stdout +++ b/bin/sh/tests/builtins/command6.0.stdout @@ -4,4 +4,4 @@ fun is a shell function break is a special shell builtin if is a shell keyword { is a shell keyword -foo is an alias for bar +foo is an alias for bar |