Fish Shell doesn't open in current directory #21491

Closed
opened 2026-01-31 07:46:14 +00:00 by claunia · 3 comments
Owner

Originally created by @vaqxai on GitHub (Apr 4, 2024).

Windows Terminal version

1.19.10573.0

Windows build number

10.0.22631.0

Other Software

fish shell v3.7.0

Steps to reproduce

  1. Add fish to windows terminal in a new profile
  2. Do not set default starting directory (leave blank for it to be the parent process dir)
  3. Launch terminal from explorer by right clicking -> Open Terminal Here

Expected Behavior

Fish shell opening in the current directory

Actual Behavior

Fish opens in the last used directory

Originally created by @vaqxai on GitHub (Apr 4, 2024). ### Windows Terminal version 1.19.10573.0 ### Windows build number 10.0.22631.0 ### Other Software fish shell v3.7.0 ### Steps to reproduce 1. Add fish to windows terminal in a new profile 2. Do not set default starting directory (leave blank for it to be the parent process dir) 3. Launch terminal from explorer by right clicking -> Open Terminal Here ### Expected Behavior Fish shell opening in the current directory ### Actual Behavior Fish opens in the last used directory
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:46:14 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 4, 2024):

That sounds like a fish feature. We actually don’t remember starting directories across invocations 😄

@DHowett commented on GitHub (Apr 4, 2024): That sounds like a fish feature. We actually don’t remember starting directories across invocations 😄
Author
Owner

@vaqxai commented on GitHub (Apr 4, 2024):

The problem is it doesn't open in the current directory at all. Is there like a environment variable or something that gets set by windows terminal that i can read with e.g. fish config to cd into? I also need to cygpath that dir because fish runs from cygwin

@vaqxai commented on GitHub (Apr 4, 2024): The problem is it doesn't open in the current directory at all. Is there like a environment variable or something that gets set by windows terminal that i can read with e.g. fish config to `cd` into? I also need to `cygpath` that dir because fish runs from cygwin
Author
Owner

@vaqxai commented on GitHub (Apr 5, 2024):

Fixed, fish had a hidden config that restored last used dir, ignoring $PWD

@vaqxai commented on GitHub (Apr 5, 2024): Fixed, fish had a hidden config that restored last used dir, ignoring $PWD
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21491