Clean up functions loader and util functions

This commit is contained in:
Henrik Lissner 2013-10-26 11:49:34 -04:00
parent eee9efe870
commit 3f8e3c28b3

View file

@ -1,7 +1,13 @@
# Open a file in Mac OS's quick-look
function quicklook {
(( $# > 0 )) && qlmanage -p $* &>/dev/null &
# Check to see if a command exists
function command_exists {
command -v "$1" &> /dev/null
}
# Ask for admin password up front and keep sudo alive until the end of the script
function keep_alive {
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
}
# Extract a compressed file with the appropriate command
@ -26,8 +32,6 @@ function unpack {
}
# Source library
source ~/.zsh/lib/util
source ~/.zsh/lib/output
source ~/.zsh/lib/os
for f in ~/.zsh/lib/*; do source "$f"; done
# vim:set ft=zsh: