From 77b7dda7e397796fac1fc395f0aa0b817877864d Mon Sep 17 00:00:00 2001 From: Kunal Gupta Date: Fri, 3 Jan 2025 21:33:50 +0530 Subject: [PATCH] fix: parent directory containing spaces --- src/filepath.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filepath.sh b/src/filepath.sh index e62b08c..1a3ec4c 100644 --- a/src/filepath.sh +++ b/src/filepath.sh @@ -15,7 +15,7 @@ __enhancd::filepath::walk() # __enhancd::filepath::get_parent_dirs does not return $PWD itself, # so add it to the array explicitly - dirs=( "${PWD}" $(__enhancd::filepath::get_parent_dirs "${1:-${PWD}}") ) + IFS=$'\n' dirs=( "${PWD}" $(__enhancd::filepath::get_parent_dirs "${1:-${PWD}}") ) for dir in "${dirs[@]}" do