mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-02 01:39:25 +00:00
Add comments into each of the function files to make them easier to find
This commit is contained in:
@ -5,9 +5,13 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function osx-ls-download-history {
|
||||
|
||||
local db
|
||||
for db in ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV*; do
|
||||
if grep -q 'LSQuarantineEvent' < <(sqlite3 "$db" .tables); then
|
||||
sqlite3 "$db" 'SELECT LSQuarantineDataURLString FROM LSQuarantineEvent'
|
||||
fi
|
||||
done
|
||||
|
||||
# }
|
||||
|
@ -5,7 +5,11 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function osx-rm-dir-metadata {
|
||||
|
||||
find "${@:-$PWD}" \( \
|
||||
-type f -name '.DS_Store' -o \
|
||||
-type d -name '__MACOSX' \
|
||||
\) -print0 | xargs -0 rm -rf
|
||||
|
||||
# }
|
||||
|
@ -5,9 +5,13 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function osx-rm-download-history {
|
||||
|
||||
local db
|
||||
for db in ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV*; do
|
||||
if grep -q 'LSQuarantineEvent' < <(sqlite3 "$db" .tables); then
|
||||
sqlite3 "$db" 'DELETE FROM LSQuarantineEvent; VACUUM'
|
||||
fi
|
||||
done
|
||||
|
||||
# }
|
||||
|
@ -5,8 +5,12 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function pfd {
|
||||
|
||||
osascript 2>/dev/null <<EOF
|
||||
tell application "Finder"
|
||||
return POSIX path of (target of first window as text)
|
||||
end tell
|
||||
EOF
|
||||
|
||||
# }
|
||||
|
@ -5,6 +5,8 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function pfs {
|
||||
|
||||
osascript 2>&1 <<EOF
|
||||
tell application "Finder" to set the_selection to selection
|
||||
if the_selection is not {}
|
||||
@ -13,3 +15,5 @@ osascript 2>&1 <<EOF
|
||||
end repeat
|
||||
end if
|
||||
EOF
|
||||
|
||||
# }
|
||||
|
@ -5,6 +5,10 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function ql {
|
||||
|
||||
if (( $# > 0 )); then
|
||||
qlmanage -p "$@" &> /dev/null
|
||||
fi
|
||||
|
||||
# }
|
||||
|
@ -5,6 +5,8 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function tab {
|
||||
|
||||
local command="cd \\\"$PWD\\\""
|
||||
(( $# > 0 )) && command="${command}; $*"
|
||||
|
||||
@ -50,3 +52,5 @@ EOF
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
# }
|
||||
|
Reference in New Issue
Block a user