fish: functions/b: Take number of levels to go back up the directory

This commit is contained in:
Sanchayan Maity 2022-01-23 11:38:20 +05:30
parent aa6c176757
commit 0f2e1d3d1e

View file

@ -1,3 +1,10 @@
function b --wraps='cd ..' --description 'alias b=cd ..' function b --description 'Move up the directory specified number of times'
cd .. $argv; if test -z $argv[1]
set n 1
else
set n $argv[1]
end
for i in (seq $n)
cd ..
end
end end