Add reveal in finder to copyable (#669)

This commit is contained in:
Max Goedjen
2025-09-03 23:36:50 -07:00
committed by GitHub
parent 74f4f1c0b1
commit 3d5f0b45bd
4 changed files with 41 additions and 11 deletions

View File

@@ -9,4 +9,17 @@ extension URL {
static var socketPath: String {
URL.agentHomeURL.appendingPathComponent("socket.ssh").path()
}
}
extension String {
var normalizedPathAndFolder: (String, String) {
// All foundation-based normalization methods replace this with the container directly.
let processedPath = replacingOccurrences(of: "~", with: "/Users/\(NSUserName())")
let url = URL(filePath: processedPath)
let folder = url.deletingLastPathComponent().path()
return (processedPath, folder)
}
}