Added prevcurl function

Downloads a file and opens it in Preivew.app
pull/68/head
Mark Szymanski 2011-07-07 11:04:27 -05:00
parent e1a299eafb
commit 3a2b525ac6
1 changed files with 11 additions and 0 deletions

View File

@ -35,3 +35,14 @@ function dock-switch() {
echo "Sorry, this only works on Mac OS X" echo "Sorry, this only works on Mac OS X"
fi fi
} }
# Download a file and open it in Preview
function prevcurl() {
if [ ! $(uname) = "Darwin" ]
then
echo "This function only works with Mac OS X"
return 1
fi
curl "$*" | open -fa "Preview"
}