From 825cc52de73935cf1de2b72275a5343f81ac6b56 Mon Sep 17 00:00:00 2001 From: Lazarus Lazaridis Date: Fri, 9 Mar 2018 01:00:54 +0200 Subject: [PATCH] Don't use mapfile Refs #12. --- goto.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goto.bash b/goto.bash index 48e3153..e58ab7b 100644 --- a/goto.bash +++ b/goto.bash @@ -164,9 +164,9 @@ function _goto_unregister_alias # Unregisters aliases whose directories no longer exist. function _goto_cleanup() { - local match matches al dir + local IFS=$'\n' match matches al dir - mapfile -t matches < <(cat ~/.goto 2>/dev/null) + read -r -a matches <<< "$(cat ~/.goto 2>/dev/null)" for i in "${!matches[@]}"; do IFS=' ' read -r -a match <<< "${matches[$i]}"