mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
lib/utils: refactor "{type => _omb_util_command}_exists"
This commit is contained in:
@@ -4,6 +4,6 @@
|
||||
[[ ${SDKMAN_DIR-} ]] || export SDKMAN_DIR=~/.sdkman
|
||||
|
||||
# Try to load sdk only if the command is not available
|
||||
if ! type_exists sdk && [[ -s $SDKMAN_DIR/bin/sdkman-init.sh ]]; then
|
||||
if ! _omb_util_command_exists sdk && [[ -s $SDKMAN_DIR/bin/sdkman-init.sh ]]; then
|
||||
source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
||||
fi
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check if zoxide is installed
|
||||
if type_exists zoxide; then
|
||||
if _omb_util_command_exists zoxide; then
|
||||
eval "$(zoxide init bash)"
|
||||
else
|
||||
echo '[oh-my-bash] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'
|
||||
|
Reference in New Issue
Block a user