home-config/fish/functions/_tide_parent_dirs.fish

c5bc1749c7a31d17fb5a3a122674e078086bb7d2 · 220 B · 7 lines raw

1 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))
7 end