34 points · by icey · 16y ago · 13 comments
Premature optimization. Spend more time learning about the tools you already have, then figure out how to shave whole seconds (over the course of a year) off using them.
After a few hours of cobbling together a decent config, I found http://bitbucket.org/Josh/oh-my-zsh/src/ to be a way better starting point. All the defaults make a bash user feel right at home (keyboard shortcuts etc), plus it organizes all the bazillion zsh options in a sane configuration layout.
`pushd` switches directories and maintains a stack of visited directories. `popd` pops the previous directory off the stack and then switches to it.
In zsh, it seems that `cd` is an alias for `pushd`. You can `cd` to a directory, then `popd` to go back.
In Windows, `pushd` seems to the easiest/only way to navigate to network directories on the command-line.
Also, `alias cd=pushd` to get that same zsh functionality in other Bourne shells.
dostuff
( cd $directory && otherstuff )
morestuffThe manual directory alias naming means that you can target the folder that you want much more accurately. Combined with tab-completion, this thing has become a huge productivity booster for me.
link: http://www.huyng.com/bashmarks-directory-bookmarks-for-the-s...
sort .bash_history | uniq -c | sort -n | tail -3
8 la
48 ..
106 d
So they're already pretty compressed. ".." is "cd ..", d is "ls --color=auto", and la is the same with -a.Very diminishing returns after these.