This commit is contained in:
Zoe 2022-04-22 16:19:39 +02:00
parent da454a7247
commit ef2965d319
4 changed files with 17 additions and 1 deletions

13
functions/upto.fish Normal file
View file

@ -0,0 +1,13 @@
function upto -a where -d "Go up to a certain directory"
set -l pieces ( pwd | tr "/" "\n")
if contains -- $where $pieces
set -l p (contains --index -- $where $pieces)
set -l dest (printf "%s\n" $pieces[1..$p] | tr "\n" "/")
cd "$dest"
return
end
return 1
end