1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-23 06:48:00 +00:00
prezto/modules/osx/functions/pfs

19 lines
565 B
Plaintext
Raw Permalink Normal View History

2012-02-01 04:37:51 +00:00
#
# Displays the current Finder.app selection.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
2011-10-12 03:13:58 +00:00
osascript 2>/dev/null <<EOF
set output to ""
tell application "Finder" to set the_selection to selection
set item_count to count the_selection
repeat with item_index from 1 to count the_selection
if item_index is less than item_count then set the_delimiter to "\n"
if item_index is item_count then set the_delimiter to ""
set output to output & ((item item_index of the_selection as alias)'s POSIX path) & the_delimiter
end repeat
EOF