From fcafb2077ea4f69c87230d8716b32ca0de3ac7fd Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Tue, 3 Jun 2025 19:24:14 -0500 Subject: [PATCH] (chore): make results variable only available to the function --- functions/__based.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/__based.fish b/functions/__based.fish index 82085a8..bf55b17 100644 --- a/functions/__based.fish +++ b/functions/__based.fish @@ -19,7 +19,7 @@ function __based # Build combined result set in SQL if test -n "$prefix" - set results (sqlite3 -batch $db " + set -f results (sqlite3 -batch $db " SELECT DISTINCT cmd FROM ( -- Prioritize commands in the current path, matching the prefix SELECT cmd, MAX(ts) as max_ts, MAX(counter) as counter, 0 as priority @@ -42,7 +42,7 @@ function __based ) ORDER BY priority ASC, counter DESC, max_ts DESC;") else - set results (sqlite3 -batch $db " + set -f results (sqlite3 -batch $db " SELECT DISTINCT cmd FROM ( -- Get the most recent command across all paths SELECT cmd, max_ts, counter, priority FROM (