public inbox for dash@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Greenberg <michael@greenberg.science>
To: Steffen Nurpmeso <steffen@sdaoden.eu>
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>, dash@vger.kernel.org
Subject: Re: [PATCH] options: don't error when unsetting OPTIND
Date: Wed, 14 Dec 2022 17:36:22 -0500	[thread overview]
Message-ID: <m2bko5obo9.fsf@greenberg.science> (raw)
In-Reply-To: <20221214174946.yISP5%steffen@sdaoden.eu>

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.

  reply	other threads:[~2022-12-14 22:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14  2:31 [PATCH] options: don't error when unsetting OPTIND наб
2022-12-14 14:18 ` Michael Greenberg
2022-12-14 17:49   ` Steffen Nurpmeso
2022-12-14 22:36     ` Michael Greenberg [this message]
2022-12-14 23:07       ` наб
2022-12-15 18:39         ` Michael Greenberg
2023-01-03  9:39 ` [PATCH] var: Do not add 1 to return value of strchrnul Herbert Xu
2023-01-03  9:51   ` [v2 PATCH] " Herbert Xu
2023-01-03 12:26   ` [PATCH] " наб
2023-01-04  9:59     ` Herbert Xu
2023-01-04 12:54       ` наб
2023-01-04 14:12         ` Herbert Xu
2023-01-04 16:05           ` наб
2023-01-04 16:50             ` Harald van Dijk
2024-05-19 11:19               ` [PATCH] options: Always reset OPTIND in getoptsreset Herbert Xu
2024-05-19 13:23                 ` Harald van Dijk
2024-05-19 14:21                   ` [v2 PATCH] " Herbert Xu
2024-05-21 14:38                     ` наб

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2bko5obo9.fsf@greenberg.science \
    --to=michael@greenberg.science \
    --cc=dash@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    --cc=steffen@sdaoden.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox