aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2012-07-29 22:04:41 +0200
committerMathias Bynens <mathias@qiwi.be>2012-07-29 22:04:41 +0200
commit3d918efbe09e8735018ee225f19e30f734ea908d (patch)
treecd1bc4f0d5c825856748407af0c717fe0252aee6 /.functions
parentb308bc6935d24da72446569500ca634f0fbfd2c4 (diff)
downloaddotfiles-3d918efbe09e8735018ee225f19e30f734ea908d.tar.gz
dotfiles-3d918efbe09e8735018ee225f19e30f734ea908d.tar.bz2
dotfiles-3d918efbe09e8735018ee225f19e30f734ea908d.zip
.functions: Add `unquarantine` which force-removes a downloaded app or file from the quarantine
Thanks to @jasomill on Hacker News: http://news.ycombinator.com/item?id=4307379.
Diffstat (limited to '.functions')
-rw-r--r--.functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/.functions b/.functions
index 8aa20c8..a544dfd 100644
--- a/.functions
+++ b/.functions
@@ -76,4 +76,11 @@ function unidecode() {
function codepoint() {
perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"
echo # newline
+}
+
+# Manually remove a downloaded app or file from the quarantine
+function unquarantine() {
+ for attribute in com.apple.metadata:kMDItemDownloadedDate com.apple.metadata:kMDItemWhereFroms com.apple.quarantine; do
+ xattr -r -d "$attribute" "$@"
+ done
} \ No newline at end of file