Add up alias to go up N directories

This commit is contained in:
Shadowfacts 2016-09-10 15:47:50 -04:00
parent 5c9ff2c02c
commit fb42af7a2a
No known key found for this signature in database
GPG Key ID: F802198A7D7F309D
1 changed files with 12 additions and 0 deletions

12
.zshrc
View File

@ -42,5 +42,17 @@ npm() {
npm "$@"
}
# Go up N directories
up() {
str=""
count=0
while [ "$count" -lt "$1" ];
do
str=$str"../"
let count=count+1
done
cd $str
}
# default file openings
alias -s ipr=open