mirror of https://github.com/cheat/cheat.git
chore: modifies envvar check
Modifies the `CHEAT_USE_FZF` envvar check within the bash autocompletion script for clarity.
This commit is contained in:
parent
ac1012f743
commit
9868ba2d68
|
@ -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") )
|
||||
|
|
Loading…
Reference in New Issue