Noah Altunian: 1 pwd: Do not reassign mode on pwd -L 1 files changed, 1 insertions(+), 1 deletions(-)
This makes sense. Thank you for the clarification.
Copy & paste the following snippet into your terminal to import this patchset into git:
curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/41669/mbox | git am -3
When ./pwd -L is invoked, mode is reassigned to mode::NORM, which is the default value. In this case we can simply use 'void'.
Alexey Yerin <yyp@disroot.org> 3 months ago This causes problems if both -L and -P are given. `pwd -PL` would have mode::REAL and as per POSIX, "If both -L and -P are specified, the last one shall apply" -- pwd(1P), so it should have mode::NORM instead.
This causes problems if both -L and -P are given. `pwd -PL` would have mode::REAL and as per POSIX, "If both -L and -P are specified, the last one shall apply" -- pwd(1P), so it should have mode::NORM instead.
--- pwd.ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwd.ha b/pwd.ha index bf095f4..2643629 100644 --- a/pwd.ha +++ b/pwd.ha @@ -26,7 +26,7 @@ export fn utilmain() (main::error | void) = { const opt = cmd.opts[i]; switch (opt.0) { case 'L' => - mode = mode::NORM; + void; case 'P' => mode = mode::REAL; case => abort(); -- 2.34.1