mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16:13 +03:00

Fixes #7286 Previously, when using the "New Ghostty Window/Tab Here" macOS service on a file, the new terminal window/tab would incorrectly open in the user's home directory. This was because the service handler only expected directory paths. This commit updates the service handler to check if the provided path is a file. If it is, the handler now uses the file's parent directory as the working directory for the new Ghostty window or tab, aligning with user expectations. If the path is a directory, it's used directly as before.