ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

cmd+click path detection truncates first directory component of relative paths

Open danyuchn opened this issue 9 months ago • 1 comments

Bug Description

When cmd+clicking on a relative file path in terminal output, Ghostty's path detection omits the first directory component, causing the file to not be found.

Steps to Reproduce

  1. Output a relative path with 2+ directory levels to the terminal, e.g.:
    echo "data/processed/thai-news/2026-02-12/report.md"
    
  2. Hold Cmd and click on the path

Expected Behavior

Ghostty detects and opens: data/processed/thai-news/2026-02-12/report.md

Actual Behavior

Ghostty detects and attempts to open: processed/thai-news/2026-02-12/report.md (the first component data/ is dropped)

Environment

  • Ghostty version: 1.2.3
  • macOS: 25.2.0 (Darwin)
  • Shell: zsh

danyuchn avatar Mar 01 '26 02:03 danyuchn

Hi @danyuchn, thanks for your interest!

This project requires that issue reporters are vouched, and you are not in the list of vouched users.

This issue will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details.

ghostty-vouch avatar Mar 01 '26 02:03 ghostty-vouch