Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Show and copy the whole path of an item in History

Țugui Dragoș5885c4a752f8
diff --git a/Peel/Views/History/HistoryDetailView.swift b/Peel/Views/History/HistoryDetailView.swift
index 7abc9da3..f6ec50ca 100644
--- a/Peel/Views/History/HistoryDetailView.swift
+++ b/Peel/Views/History/HistoryDetailView.swift
@@ -321,6 +321,10 @@ private struct HistoryRecordRow: View {
NSWorkspace.shared.activateFileViewerSelecting([record.trashedURL])
}
}
+ Button("Copy Path", systemImage: "doc.on.doc") {
+ NSPasteboard.general.clearContents()
+ NSPasteboard.general.setString(record.originalURL.path(percentEncoded: false), forType: .string)
+ }
}
}
@@ -349,6 +353,7 @@ private struct HistoryRecordRow: View {
Text(record.originalURL.abbreviatedPath)
.lineLimit(1)
.truncationMode(.middle)
+ .help(Text(verbatim: record.originalURL.path(percentEncoded: false)))
.checkboxTitleLine()
Text(place.title)
.font(.caption)