On 7/28/20 4:14 PM, Ilkka Virta wrote:
> On 28.7. 17:22, Chet Ramey wrote:
>> On 7/23/20 8:11 PM, Alexey Izbyshev wrote:
>>> $ Z='a b'
>>> $ A=(X=$Z)
>>> $ declare -p A
>>> declare -a A=([0]="X=a b")
>
>> It's an assignment statement in a context where assignment statements are
>> accepted (which
On 28.7. 17:22, Chet Ramey wrote:
On 7/23/20 8:11 PM, Alexey Izbyshev wrote:
$ Z='a b'
$ A=(X=$Z)
$ declare -p A
declare -a A=([0]="X=a b")
It's an assignment statement in a context where assignment statements are
accepted (which is what makes it different from `echo X=$Z', for instance),
but
On 7/23/20 8:11 PM, Alexey Izbyshev wrote:
> Hello!
>
> I have a question about the following behavior:
>
> $ Z='a b'
> $ A=(X=$Z)
> $ declare -p A
> declare -a A=([0]="X=a b")
> $ A=(X$Z)
> $ declare -p A
> declare -a A=([0]="Xa" [1]="b")
>
> I find it surprising that no word splitting is perfo
> On Jul 27, 2020, at 4:02 AM, Andreas Schwab wrote:
>
> On Jul 27 2020, Lawrence Velázquez wrote:
>
>> If word splitting were not performed in compound assignments, this...
>>
>>foo=(a b c)
>>
>> ...would not work.
>
> This is not true. Field splitting is only relevant for words generat
On Mon, Jul 27, 2020 at 01:31:32AM -0400, Dale R. Worley wrote:
> So it seems like the word splitting in "A=(X$Z)" is incorrect.
If the documentation doesn't support word splitting in that case,
then it's the documentation that will need to change, not the shell.
Word splitting in that context is
27 Temmuz 2020 Pazartesi tarihinde Alexey Izbyshev
yazdı:
> On 2020-07-27 10:06, Lawrence Velázquez wrote:
>
>> On Jul 27, 2020, at 1:31 AM, Dale R. Worley wrote:
>>> Interesting. The documentation for 4.2.53(1) says this about parameter
>>> assignments generally, with no special rules for comp
On Jul 27 2020, Lawrence Velázquez wrote:
> If word splitting were not performed in compound assignments, this...
>
> foo=(a b c)
>
> ...would not work.
This is not true. Field splitting is only relevant for words generated
by other expansions, not for literal tokens.
Andreas.
--
Andreas
On 2020-07-27 10:06, Lawrence Velázquez wrote:
On Jul 27, 2020, at 1:31 AM, Dale R. Worley
wrote:
Interesting. The documentation for 4.2.53(1) says this about
parameter
assignments generally, with no special rules for compound assignments:
All
values undergo tilde expansion, para
> On Jul 27, 2020, at 1:31 AM, Dale R. Worley wrote:
>
> Alexey Izbyshev writes:
>> I have a question about the following behavior:
>>
>> $ Z='a b'
>> $ A=(X=$Z)
>> $ declare -p A
>> declare -a A=([0]="X=a b")
>> $ A=(X$Z)
>> $ declare -p A
>> declare -a A=([0]="Xa" [1]="b")
>>
>> I find it su
Alexey Izbyshev writes:
> I have a question about the following behavior:
>
> $ Z='a b'
> $ A=(X=$Z)
> $ declare -p A
> declare -a A=([0]="X=a b")
> $ A=(X$Z)
> $ declare -p A
> declare -a A=([0]="Xa" [1]="b")
>
> I find it surprising that no word splitting is performed in the first
> compound as
Hello!
I have a question about the following behavior:
$ Z='a b'
$ A=(X=$Z)
$ declare -p A
declare -a A=([0]="X=a b")
$ A=(X$Z)
$ declare -p A
declare -a A=([0]="Xa" [1]="b")
I find it surprising that no word splitting is performed in the first
compound assignment. I realize that skipping word
11 matches
Mail list logo