Hacker News new | ask | show | jobs
by masklinn 3166 days ago
> The one command I'm still trying to replace is `cd` itself.

zsh will implicitly cd if you just mention a directory e.g. `$ ../foo/bar [RET]` will cd there without mention. These days I only use `cd -`.

2 comments

> These days I only use `cd -`.

There's also `cd foo bar` in zsh, which substitutes foo with bar in the name of $PWD. I rarely used it, and when I do, it's usually for a well known pair of lengthy named dirs, yet it also shaves off a couple of keystrokes pretty much daily for me.

IIRC that isn't the default. You need to enable the option for that to work.

zsh has about a thousand options you can configure.

> IIRC that isn't the default. You need to enable the option for that to work.

You're right, it's been so long I completely forgot.

It's auto_cd, and auto_pushd will also automatically push new directories to the dstack.

> zsh has about a thousand options you can configure.

I should probably go through the options list in its entirety one day, but technically according to http://zsh.sourceforge.net/Doc/Release/Options.html it's closer to a quarter of that ;)

I think it is enabled by default. I never explicitly enabled it for my zsh configuration and it behaves that way.