Skip to content

Implement cd -P, cd -L #7206

Description

@thaJeztah

Fish version:

fish --version
fish, version 3.1.2

This request was previously reported as #4845 ("cd -L, cd -P "Too many args for cd command""). At the time, Fish's cd implementation automatically dereferenced symlinks (#1957). However, starting with Fish 3.0 (pull request #5190), this behaviour changed, and Fish no longer dereferences symlinks by default;

$ mkdir foo
$ ln -s foo symlink-to-foo

$ cd symlink-to-foo

$ pwd
# /Users/sebastiaan/Projects/test/fish-foo/symlink-to-foo

$ pwd -P
# /Users/sebastiaan/Projects/test/fish-foo/foo

If would be useful to have these options implemented to navigate to the target location of a symlink.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions