Skip to content

macOS: normalize working directory paths with FilePath#12614

Open
bo2themax wants to merge 1 commit intoghostty-org:mainfrom
bo2themax:02dd9ee3
Open

macOS: normalize working directory paths with FilePath#12614
bo2themax wants to merge 1 commit intoghostty-org:mainfrom
bo2themax:02dd9ee3

Conversation

@bo2themax
Copy link
Copy Markdown
Member

This fixes for Nushell when opening Ghostty via Finder service and Shortcuts, also makes path parsing more robust in AppleScript.

image

@bo2themax bo2themax requested a review from a team as a code owner May 7, 2026 09:17
@ghostty-bot ghostty-bot Bot added the os/macos label May 7, 2026
Comment thread macos/Sources/Features/Services/ServiceProvider.swift Outdated
Copy link
Copy Markdown
Contributor

@jparise jparise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need the FilePath treatment in func application(_ sender: NSApplication, openFile filename: String), which also sets config.workingDirectory? That filename comes from app launch path.

Comment thread macos/Sources/Features/App Intents/NewTerminalIntent.swift Outdated
@bo2themax
Copy link
Copy Markdown
Member Author

Do we also need the FilePath treatment in func application(_ sender: NSApplication, openFile filename: String), which also sets config.workingDirectory? That filename comes from app launch path.

No, I checked that by dragging one on the dock icon, looks like AppKit already removed the trailing slashed.

But I'll double check for open command later.

This fixes for nuShell when opening Ghostty via Finder service and Shortcuts, also makes path parsing more robust in AppleScript.
@bo2themax
Copy link
Copy Markdown
Member Author

Do we also need the FilePath treatment in func application(_ sender: NSApplication, openFile filename: String), which also sets config.workingDirectory? That filename comes from app launch path.

No, I checked that by dragging one on the dock icon, looks like AppKit already removed the trailing slashed.

But I'll double check for open command later.

Yes, the filename is already normalized, but I force pushed and moved the changes in set, so now it will normalized the new value regardlessly.

@bo2themax bo2themax requested a review from jparise May 8, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants