fish: functions/b: Take number of levels to go back up the directory
This commit is contained in:
parent
aa6c176757
commit
0f2e1d3d1e
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue