Repository navigation
macOS paste prefers NSURL over plain text, causing Transmit SFTP paths to paste as sftp:// URLs #13152
Description
Regression from: #4956
Discussed in #13133
Originally posted by faridrashidi July 1, 2026
Issue Description
Opening this as a discussion per repository policy. I originally filed this as #13132, which was auto-closed because non-maintainers are asked to start with a discussion.
On macOS, copying a remote path from Panic Transmit with Cmd+C appears to put multiple representations on the pasteboard, including a plain text path and an NSURL/URL representation.
When pasting into Sublime Text, the plain path is pasted:
/vf/users/rashidimehrabf2/nextneopi/TCGA/TCGA-2Y-A9GS
When pasting the same clipboard contents into Ghostty with Cmd+V, Ghostty pastes the URL representation instead:
sftp://rashidimehrabf2@helix.nih.gov:22/vf/users/rashidimehrabf2/nextneopi/TCGA/TCGA-2Y-A9GS
This seems related to the macOS pasteboard representation ordering used by getOpinionatedStringContents() in NSPasteboard+Extension.swift, which currently tries readObjects(forClasses: [NSURL.self]) first and only falls back to .string afterwards. For non-file URLs, it returns absoluteString, so an SFTP URL wins over the plain text path.
Relevant source:
if let urls = readObjects(forClasses: [NSURL.self]) as? [URL],
urls.count > 0 {
return urls
.map { $0.isFileURL ? Ghostty.Shell.escape($0.path) : $0.absoluteString }
.joined(separator: " ")
}
return self.string(forType: .string)Related discussion: #12519
Expected Behavior
For normal terminal paste, Ghostty should prefer the plain text representation when one exists, or provide a way to paste plain text only.
In this case, Cmd+V should paste:
/vf/users/rashidimehrabf2/nextneopi/TCGA/TCGA-2Y-A9GS
Actual Behavior
Ghostty pastes:
sftp://rashidimehrabf2@helix.nih.gov:22/vf/users/rashidimehrabf2/nextneopi/TCGA/TCGA-2Y-A9GS
Reproduction Steps
- On macOS, connect to an SFTP server in Panic Transmit.
- Select a remote folder or file.
- Press
Cmd+Cin Transmit. This is regular Copy, notShift+Cmd+C/ Copy URL. - Paste into Sublime Text and observe that the pasted value is the plain remote path.
- Paste the same clipboard contents into Ghostty with
Cmd+V. - Observe that Ghostty pastes the
sftp://user@host:port/...URL instead of the plain path.
Ghostty Logs
No logs observed yet. This appears to be deterministic pasteboard representation selection behavior.
Ghostty Version
Unknown from CLI on the machine where I am filing this; ghostty +version was not available in PATH during discussion creation.
OS Version Information
ProductName: macOS
ProductVersion: 26.5.1
BuildVersion: 25F80
Minimal Ghostty Configuration
Reproducible with normal paste behavior; no known clipboard-related Ghostty configuration is involved.
Additional Relevant Configuration
Source application: Panic Transmit, using regular Cmd+C on a remote SFTP item.
Notes
This may be the same class of issue as #12519: Ghostty choosing a richer/non-text pasteboard representation when a plain text representation would be more appropriate for a terminal paste.
Activity
bo2themax commentedon Jul 6, 2026
See #13170