AutoYADM commit: 2025-04-18 15:00:05

This commit is contained in:
Daniel Fichtinger 2025-04-18 15:00:05 -04:00
parent fdf077274a
commit f2c722eeaa

View file

@ -24,11 +24,17 @@ function cd --wraps=cd --description "Change directory. No args goes to git root
end
if not test (pwd) = $root
__cd_orig $root
else
else if set -q dirprev
echo "prev: $dirprev[-1]
root: $root"
if string match -q "$root" "$dirprev[-1]"
set -x smartdirprev $dirprev[-1]
set -x smartroot $root
if string match -q "$root*" "$dirprev[-1]"
echo We out here
__cd_orig -
else
set -l prompt "This would take you to $dirprev[-1], which is outside $root, are you sure? (y/n): "
echo $prompt
end
end
end