Hacker News new | past | comments | ask | show | jobs | submit login

Wow. While this is quite slick (and must have been funny to implement), I actually hate this kind of "magic" behavior.



I usually hate magic too, but I have to say this is one of the cases where I like it. It's convenient without any danger attached to it since you're just switching directory and not actually executing something against this "unknown" path.


How is it more or less magic than bash’s? It takes more context into account, sure, but it’s easy to understand and reason about.


For about a decade I've had in my bashrc

    C() { cd `$HOME/path-selector.sh "$@"`; }
where path-selector is from https://github.com/MarcWeber/path-selector

Opt-in bash extensions can do basically whatever people complain bash can't do. Though to be honest I don't use it that much over the last, say, 5 years. If I know a deep directory tree that well, I can just type it explicitly and/or tab complete it without losing much time. If I don't know it that well, FZF is quite nice.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: