Skip to content

Commit 6f5e08a

Browse files
authored
fix: restore path based parsing in 4.0 (#566)
* fix: ensure dirs arent empty strings This fixes issue 564 also safely wraps strings for parsing [564] * fix: scope parts variable to function * chore: fix formatting * fix: remove hacky length test, clean up join credit to @scaryrawr where credit is due.
1 parent 44c521a commit 6f5e08a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

functions/_tide_parent_dirs.fish

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
function _tide_parent_dirs --on-variable PWD
2-
set -g _tide_parent_dirs (string escape (
3-
for dir in (string split / -- $PWD)
4-
set -la parts $dir
5-
string join / -- $parts
6-
end))
2+
set -g _tide_parent_dirs (
3+
string escape (
4+
for dir in (string split / -- $PWD)
5+
set -fa parts $dir
6+
string join / -- $parts
7+
end
8+
)
9+
)
710
end

0 commit comments

Comments
 (0)