View Issue Details

IDProjectCategoryView StatusLast Update
00019841003.1(2024)/Issue8Shell and Utilitiespublic2026-06-13 03:14
Reporterhvd Assigned To 
PrioritynormalSeverityObjectionTypeClarification Requested
Status NewResolutionOpen 
Namehvd
Organization
User Reference
Sectioncommand utility
Page Number-
Line Number-
Interp Status
Final Accepted Text
Summary0001984: Ambiguous requirements for command -v on printing absolute pathnames
DescriptionThe requirements for command -v read:

- Executable utilities, regular built-in utilities, command_names including a <slash> character, and any implementation-provided functions that are found using the PATH variable (as described in 2.9.1.4 Command Search and Execution), shall be written as absolute pathnames.

This is ambiguous as to whether "that are found using the PATH variable" applies to "Executable utilities, regular built-in utilities, command_names including a <slash> character, and any implementation-provided functions", or only to "any implementation-provided functions".

Given that "command_names including a <slash> character" are never looked up using the PATH variable (as pointed out by Herbert Xu on the dash mailing list), the intent must be that "that are found using the PATH variable" applies only to "any implementation-provided functions", but at least one shell (bash) does not currently write command_names including a <slash> character as absolute pathnames, even in POSIX mode, and in my opinion, the current text of the standard does not say it should.
Desired ActionChange

- Executable utilities, regular built-in utilities, command_names including a <slash> character, and any implementation-provided functions that are found using the PATH variable (as described in 2.9.1.4 Command Search and Execution), shall be written as absolute pathnames.

to

- Executable utilities, regular built-in utilities, and command_names including a <slash> character, shall be written as absolute pathnames.
- Any implementation-provided functions that are found using the PATH variable (as described in 2.9.1.4 Command Search and Execution) shall be written as absolute pathnames.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-06-13 03:14 hvd New Issue