Use type_exists

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
Ajeet D'Souza 2021-12-24 17:36:27 +05:30 committed by Koichi Murase
parent 6c79f70891
commit 812a8d60ef

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Check if zoxide is installed
if [ -x "$(command -v zoxide)" ]; then
if type_exists zoxide; then
eval "$(zoxide init bash)"
else
echo '[oh-my-bash] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'