4 ms·
A handy alias I use: alias ..='cd ..' Moving up the file tree has never been easier!
by AlexanderDhoore 13y ago
A handy alias I use:
alias ..='cd ..'
Moving up the file tree has never been easier!
- hk__2 13y agoPut the following in your .bashrc instead: shopt -s autocd If you type a directory in the command-line, it’ll cd into it, e.g.: $ .. # cd .. $ ~ # cd ~ $ foo # cd foo I can’t live without this.
- AlexanderDhoore 13y agoVery cool, thanks! Although: On OS X: "-bash: shopt: autocd: invalid shell option name" Apple and their outdated tools... It gets annoying after a while.
- rangibaby 13y agoInstall new bash using brew :-) (1) http://apple.stackexchange.com/questions/55412/cd-to-a-directory-by-typing-its-name http://apple.stackexchange.com/questions/55412/cd-to-a-direc...
- binofbread 13y agoI believe this is set by default in oh-my-zsh as well.
- cgore 13y agoIn Zsh, you can set it so that specifying a bare directory goes to the directory as well, for any directory. Just do setopt autocd