1
0
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:
Kaleb Elwert
2017-07-06 16:01:26 -07:00
parent a70bce3ea6
commit 7d5beeab51
36 changed files with 144 additions and 0 deletions

View File

@ -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
# }

View File

@ -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
# }

View File

@ -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
# }

View File

@ -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
# }

View File

@ -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
# }

View File

@ -5,6 +5,10 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# function ql {
if (( $# > 0 )); then
qlmanage -p "$@" &> /dev/null
fi
# }

View File

@ -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
}
# }