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
1 changed files with 9 additions and 2 deletions

View File

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