Script of shell helper functions
This commit is contained in:
parent
1c8cb165cd
commit
b2678621c9
1 changed files with 13 additions and 0 deletions
13
shell-functions
Normal file
13
shell-functions
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/zsh
|
||||
# vim: ft=zsh
|
||||
# Helper functions for the init files
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
|
||||
# Print prettier, more uniform messages
|
||||
function print_msg { print -P "%F{$1}==>%f $2" }
|
||||
function print_info { print_msg 'blue' "$@" }
|
||||
function print_error { print_msg 'red' "$@" }
|
||||
|
||||
# Return 1 if the binary exists (according to hash); 0 otherwise.
|
||||
function binary_exists { return $(hash $1 1>/dev/null 2>&1) }
|
Loading…
Add table
Add a link
Reference in a new issue