#870317 dash: "type" doesn't threat "--" specially (POSIX compliance issue)

Package:
dash
Source:
dash
Description:
POSIX-compliant shell
Submitter:
Askar Safin
Date:
2024-01-02 04:00:14 UTC
Severity:
normal
Tags:
#870317#5
Date:
2017-07-31 22:22:29 UTC
From:
To:
dash$ type -- ls
--: not found
ls is /bin/ls

"type" doesn't threat "--" specially. But POSIX 2016 edition says it should.

Also, all your builtins mentioned in POSIX (be it "special built-in utility" or normal utility) should threat "--" specially. Unless it is in this list:

#870317#10
Date:
2022-12-13 21:19:47 UTC
From:
To:
I've reviewed all built-ins, and found that this affected
type and getopts. Patchset posted to dash@, archived at forwarded-to.

наб

#870317#19
Date:
2023-01-08 13:49:56 UTC
From:
To:
Fixed in this upstream series:
https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=54485578e01017534dae30731f7682abadb38a09
https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=ba57b84b305dd16f9d3e0d798835a7e9e15454ae

type is, officially, only fixed to be consistent,
since "dash doesn't claim compatibility with XSI", and type is XSI-shaded

наб