Clean up functions loader and util functions
This commit is contained in:
parent
eee9efe870
commit
3f8e3c28b3
|
@ -1,7 +1,13 @@
|
||||||
|
|
||||||
# Open a file in Mac OS's quick-look
|
# Check to see if a command exists
|
||||||
function quicklook {
|
function command_exists {
|
||||||
(( $# > 0 )) && qlmanage -p $* &>/dev/null &
|
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
|
# Extract a compressed file with the appropriate command
|
||||||
|
@ -26,8 +32,6 @@ function unpack {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Source library
|
# Source library
|
||||||
source ~/.zsh/lib/util
|
for f in ~/.zsh/lib/*; do source "$f"; done
|
||||||
source ~/.zsh/lib/output
|
|
||||||
source ~/.zsh/lib/os
|
|
||||||
|
|
||||||
# vim:set ft=zsh:
|
# vim:set ft=zsh:
|
||||||
|
|
Loading…
Reference in a new issue