I am using posh to test my shell script that I want to run successfully on any POSIX compliant shell. While doing so, I found that the command -v
option is not supported in posh. Neither is type
.
I understand that type
is not supported because it is not required by POSIX. This is discussed at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397601#10.
"type" is an X/Open extension; note the XSI marking in the POSIX standard. Since it is not required by POSIX or by debian policy, posh doesn't implement it.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/type.html confirms this. See the [XSI]
margin code in the synopsis.
But I fail to understand why command -v
option is not supported in posh.
Some mentions that command -v
is optional at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=218530#131.
And "command -v" is an optional functionality according to http://www.opengroup.org/onlinepubs/009695399/utilities/ just to mention it.
But I am unable to confirm this at http://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html. Can you see anything here that indicates that -v
option is optional in command
?
If not, is posh
is not compliant with POSIX?