Skip to content

Comment on Shell Gamification (how I learn to use my shell aliases)

Comments

By far my biggest timesaver aliases are for cd-ing to commonly used directories.

alias ch="ch ~/Repositories/my_project/foo"

alias cn="cd ~/Repositories/my_other_project"

[bashmarks](https://github.com/huyng/bashmarks) does something similar: it provides a command to set a named bookmark on the current directory, one to jump to a bookmark, and one to list bookmarks.

(It lacks all of the magic of z -- it doesn't try to learn how you work. It's entirely explicit.)

Instead of creating aliases, I'm using z (https://github.com/rupa/z) for that. You use it instead of cd to navigate to the most frequently used directories anywhere.

Thanks for the tip. I'll try it out.

However, I am wary of "smart" things that change with usage. I like my tools to be consistent and predicable. For example, I am constantly getting burned by alt-tab

That said, I imagine the "frecency" component of z makes it more reliable.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.