[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assignment-like word shouldn't be subjected to tilde expansion in PO
From: |
Oğuz |
Subject: |
Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode |
Date: |
Mon, 20 Jul 2020 08:42:15 +0300 |
19 Temmuz 2020 Pazar tarihinde Chet Ramey <chet.ramey@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 chet@case.edu http://tiswww.cwru.edu/~chet/
>
--
Oğuz
- Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Oğuz, 2020/07/18
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Chet Ramey, 2020/07/18
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Oğuz, 2020/07/19
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Robert Elz, 2020/07/20
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Chet Ramey, 2020/07/20
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Robert Elz, 2020/07/30
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Chet Ramey, 2020/07/31
Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, M. Nejat AYDIN, 2020/07/21
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Greg Wooledge, 2020/07/21
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, M. Nejat AYDIN, 2020/07/21
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, Greg Wooledge, 2020/07/21
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, M. Nejat AYDIN, 2020/07/21
- Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode, M. Nejat AYDIN, 2020/07/21