summaryrefslogtreecommitdiff
path: root/.config/fish/functions/_tide_parent_dirs.fish
diff options
context:
space:
mode:
Diffstat (limited to '.config/fish/functions/_tide_parent_dirs.fish')
-rw-r--r--.config/fish/functions/_tide_parent_dirs.fish7
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/fish/functions/_tide_parent_dirs.fish b/.config/fish/functions/_tide_parent_dirs.fish
new file mode 100644
index 00000000..9f31b043
--- /dev/null
+++ b/.config/fish/functions/_tide_parent_dirs.fish
@@ -0,0 +1,7 @@
+function _tide_parent_dirs --on-variable PWD
+ set -g _tide_parent_dirs (string escape (
+ for dir in (string split / -- $PWD)
+ set -la parts $dir
+ string join / -- $parts
+ end))
+end