Last Updated: February 25, 2016
·
351
· wkjagt

quickly go up any number of dir levels

When going up a couple of dir levels in shell, I used to make at least one error in my repetitive index and middle finger exercise when going up more than two levels. Now I have this in my .bashrc. Going up three levels, I now type .....

alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias .......='cd ../../../../../..'
alias ........='cd ../../../../../../..'
alias .........='cd ../../../../../../../..'
alias ..........='cd ../../../../../../../../..'
alias ...........='cd ../../../../../../../../../..'

As an added bonus it looks funny.