19 Temmuz 2020 Pazar tarihinde Chet Ramey <chet.ra...@case.edu> yazdı:
> On 7/19/20 1:47 AM, Oğuz wrote: > > By the way, > > wouldn't it be better if the same tilde expansion rules as with > assignment > > statements was applied to parameter expansions that assign default > values? > > Like, > > > > unset foo > > echo ${foo=~:~otheruser} > > > > assigns `/home/oguz:~otheruser' to `foo' regardless of whether > `otheruser' > > is a valid login name for an existing user. > > Maybe, but Posix says this isn't a variable assignment context, as POSIX > defines variable assignments, and technically the shell shouldn't perform > tilde expansions after `=' or `:' at all. You could argue that bash has a > bug here in that it expands the tilde after the `='. > > Yes, apparently that's a bug too, which in my opinion needs to be fixed in normal mode as well. > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ > -- Oğuz