3 ms·
If one of your top commands is `cd ../..` you may like my alias/function `..` $ .. 2 # go back 2 directories, i.e. 'cd ../..' $ .. # 'cd ..' https://g
by Aperocky 6y ago
If one of your top commands is `cd ../..` you may like my alias/function `..`
$ .. 2 # go back 2 directories, i.e. 'cd ../..'
$ .. # 'cd ..'
https://github.com/Aperocky/unix-setup/blob/master/.bashrc#L49-L57 https://github.com/Aperocky/unix-setup/blob/master/.bashrc#L...
- moehm 6y agoI use '..' for '$ cd ..' and '...' for '$ cd ../..'.
- WalterGR 6y agoGoing to my home dir is another frequent operation for me so I also have alias ~='pushd ~' (Those are tildes but may look like dashes depending on your font and size...) Not as fancy as some other aliases I see here but does the (basic) trick.
- stevekemp 6y agoA raw "cd" with no arguments will take you back to your home-directory. Of course "~" is one less character to type, but on the off-chance you didn't know.
- JNRowe 6y agoAs we're offering alternatives. Either `shopt autocd` in bash or `setopt auto_cd` in zsh, then ~ changes to home by simply being a path.