View Issue Details

IDProjectCategoryView StatusLast Update
00019841003.1(2024)/Issue8Shell and Utilitiespublic2026-06-18 16:22
Reporterhvd Assigned To 
PrioritynormalSeverityObjectionTypeClarification Requested
Status Interpretation RequiredResolutionAccepted As Marked 
Namehvd
Organization
User Reference
Sectioncommand utility
Page Number2728
Line Number90105
Interp StatusPending
Final Accepted Textsee 0001984:0007442
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

nick

2026-06-18 16:21

manager   bugnote:0007442

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
As described, the sentence is ambiguous, and different shells have chosen different implementation strategies.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
On page 2728, lines 90105-90111, Change


  • 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 <xref>2.9.1.4 Command Search and Execution</xref>), shall be written as absolute pathnames.
  • Shell functions, special built-in utilities, regular built-in utilities not associated with a PATH search, and shell reserved words shall be written as just their names.



to


  • Executable utilities, and regular built-in utilities shall be written as absolute pathnames.

  • Any implementation-provided functions that are found using the PATH variable (as described in <xref>2.9.1.4 Command Search and Execution</xref>) shall be written as absolute pathnames.

  • It is unspecified whether command_names including a <slash> character shall be written as absolute pathnames or as relative pathnames.

  • Shell functions, special built-in utilities, regular built-in utilities not associated with a PATH search, and shell reserved words shall be written as just their names.


Issue History

Date Modified Username Field Change
2026-06-13 03:14 hvd New Issue
2026-06-18 16:21 nick Note Added: 0007442
2026-06-18 16:22 nick Status New => Interpretation Required
2026-06-18 16:22 nick Resolution Open => Accepted As Marked
2026-06-18 16:22 nick Page Number - => 2728
2026-06-18 16:22 nick Line Number - => 90105
2026-06-18 16:22 nick Interp Status => Pending
2026-06-18 16:22 nick Final Accepted Text => see 0001984:0007442