fish-shell / fish-shell/fish-shell

Terminal directory only updated on `cd`, causes problems with subshells

Open
#6,112 6 comments 0 reactions 0 assignees View on GitHub
bug macos
Dominant language
Rust
Stars
34.2k
Forks
2.4k
Avg merge
2d 8h
Merged PRs (30d)
13

Description

Fish updates the terminal's notion of the current directory every time I run `cd`, but it doesn't seem to update it any other time. This is a problem if I run a subshell and change the directory there, because upon exiting the subshell, the terminal continues to believe we're in the wrong directory.

For comparison, the system configuration for bash on macOS has it update the terminal directory as part of the `PROMPT_COMMAND` (for login shells). This means the moment I exit the subshell, it'll inform the terminal what the correct directory is.

Reproduced with fish 3.0.2.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.