From 99d8b0664861a489058e191af158580fed8f4b28 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 5 Jul 2020 20:33:19 +0800 Subject: Fix logic error about print --- gist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gist b/gist index f017e8e..88fc992 100755 --- a/gist +++ b/gist @@ -367,7 +367,7 @@ _grep_content() { grep --color=always -EHi -m1 "$1" * 2>/dev/null | head -1 }) - [[ -n $result ]] && hint=false mark="$index " _print_records && sed -e 's/^/ /' <<<"$result" + [[ -n $result ]] && cd - >/dev/null && hint=false mark="$index " _print_records && sed -e 's/^/ /' <<<"$result" fi done } -- cgit v1.2.3-70-g09d2