← Commit list

eb6b48ba7

Ron Yorston
Ron Yorston
2015-05-18
SUCCESS Duration: 155s

Subject

ash: perform tilde expansion in all parameter expansion words

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+2 -2
@@ -6361,8 +6361,8 @@ subevalvar(char *p, char *varname, int strloc, int subtype,
// p, varname, strloc, subtype, startloc, varflags, quotes);
herefd = -1;
- argstr(p, (subtype != VSASSIGN && subtype != VSQUESTION) ? EXP_CASE : 0,
- var_str_list);
+ argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ?
+ EXP_CASE : 0), var_str_list);
STPUTC('\0', expdest);
herefd = saveherefd;
argbackq = saveargbackq;
shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.right+1 -0
@@ -0,0 +1 @@
+:/root
shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests+2 -0
@@ -0,0 +1,2 @@
+a=~root:~root
+echo ${a#~root}