From 9868ba2d68d4c7ded6bca2eee5e8717605c8afab Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Sun, 2 Feb 2020 14:39:04 -0500 Subject: [PATCH] chore: modifies envvar check Modifies the `CHEAT_USE_FZF` envvar check within the bash autocompletion script for clarity. --- scripts/cheat.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cheat.bash b/scripts/cheat.bash index fae938a..6ef1437 100755 --- a/scripts/cheat.bash +++ b/scripts/cheat.bash @@ -3,7 +3,7 @@ # generate cheatsheet completions, optionally using `fzf` _cheat_complete_cheatsheets() { - if [[ "${CHEAT_USE_FZF:-0}" != 0 ]]; then + if [[ "$CHEAT_USE_FZF" = true ]]; then FZF_COMPLETION_TRIGGER='' _fzf_complete "--no-multi" "$@" < <( cheat -l | tail -n +2 | cut -d' ' -f1 ) @@ -15,7 +15,7 @@ _cheat_complete_cheatsheets() # generate tag completions, optionally using `fzf` _cheat_complete_tags() { - if [[ "${CHEAT_USE_FZF:-0}" != 0 ]]; then + if [ "$CHEAT_USE_FZF" = true ]; then FZF_COMPLETION_TRIGGER='' _fzf_complete "--no-multi" "$@" < <(cheat -T) else COMPREPLY=( $(compgen -W "$(cheat -T)" -- "$cur") )