merging robbyrussel

This commit is contained in:
Locojay 2011-05-29 22:42:03 -04:00
commit 90ad453902
28 changed files with 474 additions and 30 deletions

View file

@ -5,6 +5,15 @@
# VERSION: 1.0.1
# ------------------------------------------------------------------------------
alias showfiles='defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder'
alias hidefiles='defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder'
# Recursively delete .DS_Store files
alias rm-dsstore="find . -name '*.DS_Store' -type f -delete"
function savepath() {
pwd > ~/.current_path~
}
function tab() {
local command="cd \\\"$PWD\\\""
@ -44,7 +53,7 @@ EOF
}
function pfd() {
osascript 2>/dev/null <<EOF
osascript 2>/dev/null <<EOF
tell application "Finder"
return POSIX path of (target of window 1 as alias)
end tell
@ -52,14 +61,14 @@ EOF
}
function pfs() {
osascript 2>/dev/null <<EOF
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
set output to output & ((item item_index of the_selection as alias)'s POSIX path) & the_delimiter
end repeat
EOF
}