Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Built-in zsh behaviour in fact, oh-my-zsh just enables some extremely useful non-default options.

With a compinit call the directory substring expansion will work. And, with auto_pushd enabled cd fiddles with the directory stack.

The ....... behaviour is interesting because it uses a global alias(alias -g) which is an awesome feature for text expansion anywhere in a line, unlike standard aliases which only expand where commands should be given. It means, for example, you can do `readlink -f ......` and it would perform `readlink ../../../../../..`. Aliases on zsh are very powerful indeed.

I'm writing this text in the hope it drives at least one person to burn an afternoon on the amazing(but huge) zsh documentation, because the entire thing is full of gems.



I'll add that to my Read-Only Friday. I got tossed directly into the zsh/omz/fzf pool head-first from bash, so the borders of what's what are murky. Definitely some powerful stuff, so far.


In which case, I've won!

Seriously though, I think you were probably lucky to have experienced zsh that way. The out of the box experience is incredibly bare. Said as a fellow oh-my-zsh user going back the full twelve years, according to the history of oh-my-zsh's jnrowe theme ;)

I do believe there is a lot of useful knowledge to be gained from working back towards zsh first principles though, especially if -- like me -- you spend hours a day alongside the prompt.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: