Repository navigation
macOS: new window, tab or split does not inherit current working directory #14952
Issue DescriptionOn macOS since Ghostty 1.4.0: When opening a new tab I expect the new tab to inherit the working directory of the previously focused tab. However, the working directory of the new tab is always $HOME. The same applies for opening new windows or splits. I did not configure Expected BehaviorThe new working directory of the window, tab or split should be in the same as the previous focused window, tab or split. Actual BehaviorThe working directory in thew new window, tab or split is always the home directory. Reproduction Steps
Ghostty VersionOS Version InformationmacOS Golden Gate 27.0.1 Minimal Ghostty Configuration(empty)I acknowledge that:
|
Replies: 7 comments 6 replies
|
Do you have shell integration enabled? That's required for Ghostty to know what the current working directory is. |
|
I have the same issue after upgrading to Ghostty 1.4.0 on macOS Tahoe 26.7.2 Tried enabling |
|
since could you run these in the fish shell ghostty first opened, then paste the output? functions __update_cwd_osc __fish_update_cwd_osc
functions --handlers-type variableghostty 1.4.0's integration registers those definitions and handlers would show which reporting code is present and whether it's registered for directory changes |
|
couldn't reproduce with zero config |
|
I was able to solve this problem by making sure my computer's hostname doesn't have whitespace. See https://stackoverflow.com/questions/30029160/osx-terminal-new-tab-in-same-directory. Specifically, Ghostty 1.4.0 must have changed how it obtains/treats the hostname from the system. There is a related discussion in #9372. |
|
@ranyodh can you run |
#14970