From c78bb6d5923b98acb5985870e62daddc79c33dd4 Mon Sep 17 00:00:00 2001 From: Ethan P Date: Fri, 17 Jan 2020 20:42:18 -0800 Subject: [PATCH] Fix boolean conditional branching --- src/batgrep.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/batgrep.sh b/src/batgrep.sh index a2ab9cd..cc58089 100755 --- a/src/batgrep.sh +++ b/src/batgrep.sh @@ -140,9 +140,9 @@ if [[ "$OPT_CONTEXT_BEFORE" -eq 0 && "$OPT_CONTEXT_AFTER" -eq 0 ]]; then fi # Handle the --search-pattern option. -if [[ "$OPT_SEARCH_PATTERN" ]]; then +if "$OPT_SEARCH_PATTERN"; then if is_pager_less; then - if [[ "$OPT_FIXED_STRINGS" ]]; then + if "$OPT_FIXED_STRINGS"; then # This strange character is a ^R, or Control-R, character. This instructs # less to NOT use regular expressions, which is what the -F flag does for # ripgrep. If we did not use this, then less would match a different pattern