[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Assigning builtins behavior
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Assigning builtins behavior |
Date: |
Mon, 8 Jan 2018 14:25:12 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 1/8/18 8:07 AM, Eric Blake wrote:
> On 01/07/2018 03:10 PM, Quentin L'Hours wrote:
>> Hi,
>>
>> I've always thought builtins could not have a custom parsing, however it
>> seems that export/readonly/declare/local (all the builtins creating an
>> assignment) are able to disable field splitting when an assignment takes
>> place, why is that? I know a simple assignment disables field splitting,
>> but after all that's because the grammar states it should, but doesn't
>> POSIX requires all simple commands to have the same splitting behavior?
>
> No, POSIX actually documents the notion of an "assignment context", and
> builtins like export/readonly/declare/local are all examples of commands
> with assignment context parsing:
>
> http://austingroupbugs.net/view.php?id=960#c2777
I'm pretty sure you meant http://austingroupbugs.net/view.php?id=351
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/
signature.asc
Description: OpenPGP digital signature