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

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

 



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.



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

  Powered by Linux