Created
December 2, 2010 04:59
-
-
Save statonjr/724798 to your computer and use it in GitHub Desktop.
Nu script to copy the path of the selected item in the Finder to the Clipboard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/nush | |
(load "ScriptingBridge") ;; Access the Finder | |
(function path () | |
(((((SBApplication applicationWithBundleIdentifier:"com.apple.Finder") selection) get) objectAtIndex:0) URL)) | |
(function stripURL (path) | |
(path substringFromIndex:16)) | |
(system ("echo " stringByAppendingString:((stripURL (path)) stringByAppendingString:" | pbcopy"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment