You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you expect to happen?
The terminal should behave normally and the 'enhancd' should log the new visited PATH
What actually happened?
A error is printed on the terminal:
Output
find: ‘/home/rafaeldominiquini/Documents/Projects/ZZZ’: No such file or directory
find: ‘-’: No such file or directory
find: ‘Others’: No such file or directory
Additional context
Delete enhancd.log (The bug only happens the first time the directory is visited!)
Create a dir "/home/username/dir with space/destination"
Navigate to the dir "dir with space": cd /home/username/dir\ with\ space
Navigate to "destination": cd destination
Error is printed on the terminal
Some debug with set -x:
...
+++++ for dir in "${dirs[@]}"
+++++ command find '/home/rafaeldominiquini/Documents/Projects/ZZZ - Others/ugrep' -maxdepth 1 -type d -name '\.*' -prune -o -type d -print
+++++ for dir in "${dirs[@]}"
+++++ command find /home/rafaeldominiquini/Documents/Projects/ZZZ -maxdepth 1 -type d -name '\.*' -prune -o -type d -print
find: ‘/home/rafaeldominiquini/Documents/Projects/ZZZ’: No such file or directory
+++++ for dir in "${dirs[@]}"
+++++ command find - -maxdepth 1 -type d -name '\.*' -prune -o -type d -print
find: ‘-’: No such file or directory
+++++ for dir in "${dirs[@]}"
+++++ command find Others -maxdepth 1 -type d -name '\.*' -prune -o -type d -print
find: ‘Others’: No such file or directory
...
The bug is on the file 'filepath.sh' on the line 22!
Testing on BASH in Ubuntu 22.04 (WSL2 under Windows 10)
App version: "master"
Thanks
The text was updated successfully, but these errors were encountered:
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
What did you expect to happen?
The terminal should behave normally and the 'enhancd' should log the new visited PATH
What actually happened?
A error is printed on the terminal:
Output
Additional context
cd /home/username/dir\ with\ space
cd destination
Some debug with set -x:
The bug is on the file 'filepath.sh' on the line 22!
Testing on BASH in Ubuntu 22.04 (WSL2 under Windows 10)
App version: "master"
Thanks
The text was updated successfully, but these errors were encountered: