From 36447d94c994b665ec9d8fe3815410435c85d1ae Mon Sep 17 00:00:00 2001 From: Lazarus Lazaridis Date: Fri, 9 Mar 2018 01:39:38 +0200 Subject: [PATCH] Properly split lines with directories with spaces --- goto.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/goto.bash b/goto.bash index 747fc38..c9aeadf 100644 --- a/goto.bash +++ b/goto.bash @@ -172,8 +172,9 @@ function _goto_cleanup() read -d '' -r -a matches < ~/.goto + IFS=' ' for i in "${!matches[@]}"; do - IFS=' ' read -r -a match <<< "${matches[$i]}" + read -r -a match <<< "${matches[$i]}" al="${match[0]}" dir="${match[*]:1}"