chore(config): zsh env settings reworking

This commit is contained in:
2023-07-27 14:19:37 +03:00
parent d7106ae28f
commit 4e2ee377f2
5 changed files with 63 additions and 50 deletions

View File

@@ -204,6 +204,19 @@ function have
command -v "$1" >&/dev/null
}
# shorthand for checking if brew package is installed
# usage: have_brew php && php -v
function have_brew
{
! have brew && return 125
if brew list "$1" &> /dev/null; then
return 0
else
return 1
fi
}
# Remove directory from the PATH variable
# usage: path_remove ~/.local/bin
function path_remove