Navigating at the command line

stupid ideas slackathon logo

People say "real life" is the thing, but I prefer the command line. I live there all day.

One thing I recommend for your powershell profile, is this little piece of ascii art:

function ..() { cd ..}
function ...() { cd ..\..}
function ....() { cd ..\..\..}
function .....() { cd ..\..\..\..}
function ......() { cd ..\..\..\..\..}
function .......() { cd ..\..\..\..\..\..}
function ........() { cd ..\..\..\..\..\..\..}
function .........() { cd ..\..\..\..\..\..\..\..}
function ..........() { cd ..\..\..\..\..\..\..\..\..}
function ...........() { cd ..\..\..\..\..\..\..\..\..\..}
function ............() { cd ..\..\..\..\..\..\..\..\..\..\..}

It's super helpful when you're navigating around.

If you want to move "up" by 3 folders, you just type "...."

In bash you can put an equivalent thing in your profile.

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

For bonus points, don't use cd -- use pushd instead (it works in bash, powershell, even DOS) -- and it means you can return to a previous location with popd.

 

My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.