mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-30 21:18:16 +00:00
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.
This commit is contained in:
1 parent
7b21d545b3
commit
1bbd788ee0
1 file changed
+4
-2
@@ -357,9 +357,11 @@ main() {
|
|||||||
/?)
|
/?)
|
||||||
prompt / r
|
prompt / r
|
||||||
|
|
||||||
# word splitting and globbing intentional
|
IFS=
|
||||||
|
# globbing intentional, word splitting is disabled.
|
||||||
# shellcheck disable=2086
|
# shellcheck disable=2086
|
||||||
set -- "$ans"*
|
set -- $ans*
|
||||||
|
unset IFS
|
||||||
|
|
||||||
case $1$# in
|
case $1$# in
|
||||||
"$ans*1") set -- 'no results'
|
"$ans*1") set -- 'no results'
|
||||||
|
|||||||
Reference in new issue
Block a user