Skip to content

Reject an empty operand in the cd built-in #104

Closed
@magicant

Description

@magicant

POSIX.1-2024 requires that the cd built-in fail if given an empty operand as in cd ''.

Currently, cd -L '' is effectively equivalent to cd -L "$PWD/", which usually results in successfully not changing the working directory.

  • Update the implementation to add a check for an empty operand. The exit status should be 5 on error.
  • Update the test scripts.
  • Update the user manual.
  • Update the NEWS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions