From eb6b48ba743d510ad9e6f9c3a8b3899d1eb9b5f3 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 18 May 2015 09:51:35 +0200 Subject: ash: perform tilde expansion in all parameter expansion words Previously tilde expansion was not carried out for =?#% expansion words. Test case: a=~root:~root echo ${a#~root} Old result: /root:/root New result: :/root Based on commit dd721f71 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta subevalvar 1152 1153 +1 Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.right | 1 + shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.right create mode 100755 shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests (limited to 'shell/ash_test/ash-vars') diff --git a/shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.right b/shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.right new file mode 100644 index 0000000..2357750 --- /dev/null +++ b/shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.right @@ -0,0 +1 @@ +:/root diff --git a/shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests b/shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests new file mode 100755 index 0000000..6605315 --- /dev/null +++ b/shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests @@ -0,0 +1,2 @@ +a=~root:~root +echo ${a#~root} -- cgit v1.1