pfd: Return the path of the frontmost Finder window. Mnemonic: print Finder directory.pfs: Return the current Finder selection. Mnemonic: print Finder selection.cdf: cd to the current Finder directory. Mnemonic: cd Finder.
- Open Script Editor from
/Applications/Utilities. - Create a new script and save it to
~/Library/Script Librarieswith the nameFinderUtils.scpt. Make sure that File Format is set to Script in the save dialog. - Copy the contents of
FinderUtils.jsto your newly created script library. - Save each utility to
~/.local/binwith permissions set to755.
None of these may be used remotely, they will only work locally.
The pfd utility will fail for special views such as Recents, Computer, AirDrop, or Network. I don't know if it works with iCloud Drive.
These utilities were heavily inspired by oh-my-fish's osx plugin.
License: MIT.