Code Review
/
common
/
bash_it.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
e1a299e
)
Added prevcurl function
author
Mark Szymanski
<mrman208@me.com>
Thu, 7 Jul 2011 16:04:27 +0000
(11:04 -0500)
committer
Mark Szymanski
<mrman208@me.com>
Thu, 7 Jul 2011 16:04:27 +0000
(11:04 -0500)
Downloads a file and opens it in Preivew.app
plugins/available/osx.plugin.bash
patch
|
blob
|
history
diff --git
a/plugins/available/osx.plugin.bash
b/plugins/available/osx.plugin.bash
index
76e4b9a
..
cf55377
100644
(file)
--- a/
plugins/available/osx.plugin.bash
+++ b/
plugins/available/osx.plugin.bash
@@
-35,3
+35,14
@@
function dock-switch() {
echo "Sorry, this only works on Mac OS X"
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"
+}