From 1bbd788ee0630c292bb41f82607fe778394523d0 Mon Sep 17 00:00:00 2001 From: Nathan Sketch Date: Thu, 7 Jan 2021 09:45:12 -0500 Subject: [PATCH] this bug this branch was meant to fix was caused by word splitting. surrounding $ans in double quotes stopped that, but it also disabled globbing which is desired. this commit switches to just disabling word splitting. --- shfm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shfm b/shfm index f38a66b..cfeeae7 100755 --- a/shfm +++ b/shfm @@ -357,9 +357,11 @@ main() { /?) prompt / r - # word splitting and globbing intentional + IFS= + # globbing intentional, word splitting is disabled. # shellcheck disable=2086 - set -- "$ans"* + set -- $ans* + unset IFS case $1$# in "$ans*1") set -- 'no results'