File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11function _tide_pwd_var_change -v PWD
22 set -l preDirNumberPwd (string replace $HOME ' ~' $PWD )
3- set -l preDirNumberPwdSplit (string split --no-empty ' /' $preDirNumberPwd )
3+ set -l preDirNumberPwdSplit (string split ' /' $preDirNumberPwd )
44
55 set -g _tide_split_pwd $preDirNumberPwdSplit [(math -s0 -$tide_pwd_max_dirs )..-1]
66 set -g _tide_pwd (string join ' /' $_ tide_split_pwd)
@@ -10,13 +10,17 @@ function _tide_pwd_var_change -v PWD
1010 set -g _tide_pwd_anchors
1111
1212 if contains ' first' $tide_pwd_anchors
13- set -a _tide_pwd_anchors $_ tide_split_pwd[1]
13+ if test -n " $_ tide_split_pwd[1]"
14+ set -a _tide_pwd_anchors $_ tide_split_pwd[1]
15+ else
16+ set -a _tide_pwd_anchors $_ tide_split_pwd[2]
17+ end
1418 end
1519 if contains ' last' $tide_pwd_anchors
1620 set -a _tide_pwd_anchors $_ tide_split_pwd[-1]
1721 end
1822 if contains ' git' $tide_pwd_anchors
19- set -a _tide_pwd_anchors (string replace $HOME ' ~' $_ tide_git_dir | string split --no-empty - r -m1 ' /' )[2]
23+ set -a _tide_pwd_anchors (string replace $HOME ' ~' $_ tide_git_dir | string split -r -m1 ' /' )[2]
2024 end
2125
2226 _tide_pwd
You can’t perform that action at this time.
0 commit comments