cd with multiple directory argument fails

Bug #1683576 reported by Murukesh Mohanan
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In bash 4.4, a new behaviour was introduced for cd, where it would complain if multiple arguments are provided. From config-top.h [1]:

/* Define CD_COMPLAINS if you want the non-standard, but sometimes-desired
   error messages about multiple directory arguments to `cd'. */
#define CD_COMPLAINS

It seems like this is enabled for Ubuntu. However, this behaviour conflicts with the manual (both Ubuntu's and GNU's), which says something similar to: "Any additional arguments following directory are ignored."

Please revert to the old behaviour, or correct the manual. This is not a user-configurable setting, and push is also affected.

Ubuntu 17.04
bash 4.4-2ubuntu1

[1]: http://git.savannah.gnu.org/cgit/bash.git/tree/config-top.h#n30

Tags: bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash (Ubuntu):
status: New → Confirmed
Revision history for this message
Norbert (nrbrtx) wrote :

Seen on AskUbuntu during discussion of the problem "Command cd behavior" (https://askubuntu.com/q/992192/66509).

tags: added: artful bionic
Revision history for this message
Norbert (nrbrtx) wrote :

Also on "Ubuntu 17.04 — bash: cd: too many arguments" (https://askubuntu.com/q/905832/66509).

Norbert (nrbrtx)
tags: added: zesty
Revision history for this message
Quigi (brechbuehler) wrote :

This is still broken in Ubuntu 18.04.5 LTS / GNU bash, version 4.4.20(1)-release
and in Ubuntu 20.04.1 LTS / GNU bash, version 5.0.17(1)-release.

The manual pages for Bash 4.2, Bash 4.4 and Bash 5.0 all specify "Any additional arguments following dir are ignored. (Only bash 4.2 works correctly.)

This is a bug.

Norbert (nrbrtx)
tags: removed: artful zesty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.