help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Assigning builtins behavior


From: Eric Blake
Subject: Re: [Help-bash] Assigning builtins behavior
Date: Mon, 8 Jan 2018 07:14:30 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 01/08/2018 07: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

Apologies for linking to the wrong place; I meant this one:

http://austingroupbugs.net/view.php?id=351#c865

which defines the term "Declaration Utility" for something that parses
its arguments in assignment context.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]