2011-10-12 11:13:58 +08:00
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
2011-05-28 23:27:50 +08:00
|
|
|
|
2011-10-12 11:13:58 +08:00
|
|
|
# Change directory to the current Finder directory.
|
|
|
|
alias cdf='cd "$(pfd)"'
|
2011-02-18 20:17:00 +08:00
|
|
|
|
2011-10-12 11:13:58 +08:00
|
|
|
# Push directory to the current Finder directory.
|
|
|
|
alias pushdf='pushd "$(pfd)"'
|
2011-02-23 12:32:50 +08:00
|
|
|
|
2011-10-12 11:13:58 +08:00
|
|
|
# Open files in Quick Look.
|
|
|
|
function ql() {
|
|
|
|
(( $# > 0 )) && qlmanage -p "$@" &> /dev/null
|
2011-02-23 12:32:50 +08:00
|
|
|
}
|
|
|
|
|
2011-10-12 11:13:58 +08:00
|
|
|
# Delete .DS_Store and __MACOSX directories.
|
2011-07-29 06:20:36 +08:00
|
|
|
function rm-osx-cruft() {
|
2012-01-21 08:52:08 +08:00
|
|
|
find "${@:-$PWD}" \( \
|
|
|
|
-type f -name '.DS_Store' -o \
|
|
|
|
-type d -name '__MACOSX' \
|
|
|
|
\) -print0 | xargs -0 rm -rf
|
2011-07-29 06:20:36 +08:00
|
|
|
}
|
2011-12-29 03:54:19 +08:00
|
|
|
|