From 1eae74cc6d54cd1391b4c1e63897967ec2e74c22 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Tue, 16 Jul 2024 12:01:51 -0400 Subject: [PATCH] Better syntax for command[__] --- zsh/modules/keybinds/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/modules/keybinds/init.zsh b/zsh/modules/keybinds/init.zsh index aee52d5..62dc9c4 100644 --- a/zsh/modules/keybinds/init.zsh +++ b/zsh/modules/keybinds/init.zsh @@ -3,8 +3,8 @@ bindkey '^ ' autosuggest-accept # fzf # If fzf is installed, source fzf key bindings. -if (( $+commands[fzf] )); then - source <(fzf --zsh) +if [[ -x "$(command -v fzf)" ]]; then + source <(fzf --zsh) fi # Open command in $EDITOR