How to use bookmarks in bash/zsh

Moving around your terminal effectively is going to make you more productive. Sometimes you need to quickly move between different projects or directories located in different places in your machine. For instance, maybe your code lives in ~/project/my-project, but the configuration of the server is in /etc/... Remembering locations is inefficient, and often they take longer to write. What if there is an easy, inexpensive solution in 4 lines of bash?

Example of how the autocomplete works with the proposed bookmarks.
How my bookmarks look like

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alberto de Murga

Alberto de Murga

119 Followers

Software engineer at @bookingcom . I write about tech, mostly *nix, git, JS & Go. https://threkk.com