Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fish should treat an empty directory name in CDPATH as the current directory #2106

Copy link
Copy link

Description

@hugomg
Issue body actions

In dash and bash, an empty directory name in CDPATH means the current working directory so setting CDPATH to :/ has the same meaning as setting it to .:/. Fish doesn't have this default though:

dash$ export CDPATH=":/"
dash$ cd Desktop      #this works
dash$ cd ..
dash$ fish # Now lets see what happens in fish
fish$ cd Desktop
cd: The directory “Desktop” does not exist

The motivation for me reporting this is that this problem is a bit similar to the problem in #2090. Other shells might append to the CDPATH using CDPATH=$CDPATH:/blah and that will leave a colon at the start if CDPATH is previously unset. In that case, when Fish breaks it down into an array the first element will be the empty string.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.