Don't use mapfile

Refs #12.
This commit is contained in:
Lazarus Lazaridis 2018-03-09 01:00:54 +02:00 committed by GitHub
parent ae7e85180e
commit 825cc52de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,9 +164,9 @@ function _goto_unregister_alias
# Unregisters aliases whose directories no longer exist. # Unregisters aliases whose directories no longer exist.
function _goto_cleanup() 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 for i in "${!matches[@]}"; do
IFS=' ' read -r -a match <<< "${matches[$i]}" IFS=' ' read -r -a match <<< "${matches[$i]}"