shell: have, path_(append|prepend|remove)

- have: command -v shorthand
- path_append: appends dir to PATH
- path_prepend: prepends dir to PATH
- path_remove: removes dir from PATH
This commit is contained in:
2023-04-14 00:42:08 +03:00
parent 4492c386b6
commit e5d6cb37fd
15 changed files with 124 additions and 111 deletions

View File

@@ -4,9 +4,7 @@
# shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh"
if ! command -v gh &> /dev/null; then
msg_run "gh (GitHub Client) could not be found, please install it first"
else
have gh && {
extensions=(
# GitHub CLI extension for generating a report on repository dependencies.
andyfeller/gh-dependency-report
@@ -41,4 +39,4 @@ else
done
msg_ok "Done"
fi
} || msg_err "gh (GitHub Client) could not be found, please install it first"