From 3913586f678437d6de80bc96c8eea0e1e69a51ac Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Wed, 5 Jul 2023 17:05:39 -0300 Subject: Updated tide --- .config/fish/functions/_tide_pwd.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.config/fish/functions/_tide_pwd.fish') diff --git a/.config/fish/functions/_tide_pwd.fish b/.config/fish/functions/_tide_pwd.fish index 1680528e..3bd53b0f 100644 --- a/.config/fish/functions/_tide_pwd.fish +++ b/.config/fish/functions/_tide_pwd.fish @@ -7,7 +7,7 @@ set -l home_icon $tide_pwd_icon_home' ' set -l pwd_icon $tide_pwd_icon' ' eval "function _tide_pwd - if set -l split_pwd (string replace -r '^$HOME' '~' \$PWD | string split /) + if set -l split_pwd (string replace -r '^$HOME' '~' -- \$PWD | string split /) test -w . && set -f split_output \"$pwd_icon\$split_pwd[1]\" \$split_pwd[2..] || set -f split_output \"$unwritable_icon\$split_pwd[1]\" \$split_pwd[2..] set split_output[-1] \"$color_anchors\$split_output[-1]$reset_to_color_dirs\" @@ -15,7 +15,7 @@ eval "function _tide_pwd set -f split_output \"$home_icon$color_anchors~\" end - string join / \$split_output | string length -V | read -g _tide_pwd_len + string join / -- \$split_output | string length -V | read -g _tide_pwd_len i=1 for dir_section in \$split_pwd[2..-2] string join -- / \$split_pwd[..\$i] | string replace '~' $HOME | read -l parent_dir # Uses i before increment -- cgit v1.2.3