zsh-config/functions/has
Robert Morrison 5d1484881e
fix: add some compatibility options
this commit introduces the `has` function.
Now I can ensure that any command I want to alias or call is available
first.

This should allow the config to automatically slot in even where systems
aren't configured in the way I would expect
2022-12-05 21:29:10 +00:00

9 lines
109 B
Plaintext

## Has function
has() {
Command=$1
[[ -z $Command ]] && return 1
command -v $Command > /dev/null 2>&1
}