diff --git a/zsh/plugins/fnm.plugin.zsh b/zsh/plugins/fnm.plugin.zsh index 426fc06..da0daad 100644 --- a/zsh/plugins/fnm.plugin.zsh +++ b/zsh/plugins/fnm.plugin.zsh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # Setup Fast Node Manager -if type fnm > /dev/null; then +if (( ${+commands[fnm]} )); then eval "$(fnm env --use-on-cd)" fi diff --git a/zsh/plugins/fzf.plugin.zsh b/zsh/plugins/fzf.plugin.zsh index 0a4c24f..91413ef 100644 --- a/zsh/plugins/fzf.plugin.zsh +++ b/zsh/plugins/fzf.plugin.zsh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # Setup fzf completions -if type fzf > /dev/null; then +if (( ${+commands[fzf]} )); then eval "$(fzf --zsh)" fi diff --git a/zsh/plugins/github-copilot.plugin.zsh b/zsh/plugins/github-copilot.plugin.zsh index 1e0761a..677ad77 100644 --- a/zsh/plugins/github-copilot.plugin.zsh +++ b/zsh/plugins/github-copilot.plugin.zsh @@ -2,7 +2,7 @@ # Setup GitHub Copilot # first check we even have the genereic `gh` command -if type gh > /dev/null; then +if (( ${+commands[gh]} )); then # Now check we have the copilot plugin installed with `gh` if gh extension list | rg copilot -c > /dev/null; then eval "$(gh copilot alias -- zsh)" diff --git a/zsh/plugins/mcfly.plugin.zsh b/zsh/plugins/mcfly.plugin.zsh index 0533b0a..aa0c782 100644 --- a/zsh/plugins/mcfly.plugin.zsh +++ b/zsh/plugins/mcfly.plugin.zsh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # McFly -if type mcfly > /dev/null; then +if (( ${+commands[mcfly]} )); then eval "$(mcfly init zsh)" fi diff --git a/zsh/plugins/ngrok.plugin.zsh b/zsh/plugins/ngrok.plugin.zsh index b038dce..7b5fcb4 100644 --- a/zsh/plugins/ngrok.plugin.zsh +++ b/zsh/plugins/ngrok.plugin.zsh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # ngrok completions -if command -v ngrok &>/dev/null; then +if (( ${+commands[ngrok]} )); then eval "$(ngrok completion)" fi diff --git a/zsh/plugins/thefuck.plugin.zsh b/zsh/plugins/thefuck.plugin.zsh index c297223..ce9f8e0 100644 --- a/zsh/plugins/thefuck.plugin.zsh +++ b/zsh/plugins/thefuck.plugin.zsh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # Init the fuck -if type thefuck > /dev/null; then +if (( ${+commands[thefuck]} )); then eval "$(thefuck --alias)" fi diff --git a/zsh/plugins/zoxide.plugin.zsh b/zsh/plugins/zoxide.plugin.zsh index b2b70d0..9b6930d 100644 --- a/zsh/plugins/zoxide.plugin.zsh +++ b/zsh/plugins/zoxide.plugin.zsh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # zoxide - a better `cd` command -if command -v zoxide &>/dev/null; then +if (( ${+commands[zoxide]} )); then eval "$(zoxide init zsh)" fi