Re: [PATCH] options: don't error when unsetting OPTIND

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

 



On 2022-12-15 at 12:07:38 AM, наб wrote:

> Hi!
>
> On Wed, Dec 14, 2022 at 05:36:22PM -0500, Michael Greenberg wrote:
>> On 2022-12-14 at 06:49:46 PM, Steffen Nurpmeso wrote:
>> 
>> > Michael Greenberg wrote in
>> >  <m2edt2nk5q.fsf@greenberg.science>:
>> >  ...
>> >  |Bafflingly, the POSIX spec gives the example `readonly HOME PWD`, but
>> >  |with no explanation about why one might want to do that. (I get making
>> >  |`HOME` readonly, but `PWD`? Is that supposed to stop `cd` from working?)
>> >
>> > PWD is a beast with lots of "behaviors of the cd and pwd utilities
>> > are unspecified" in case of user edits, see "2.5.3 Shell Variables".
>> 
>> Is running `readonly PWD` the same as setting `PWD`?
>> 
>> The language in the documentation for `cd` and in 2.5.3 only talks about setting or
>> unsetting `PWD`, but not the export/readonly bits.
>
> Isssue 8 Draft 2.1, XBD, 8.1 Environment Variable Definition para. 11
> (p. 156, ll. 5381-5390) says:

Thank you for finding this! I didn't think to check the current draft.

Cheers,
Michael




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux