Bash Shortcut

- Bash

My dev environment for go is nested deep.

$cd ~/go/src/

Here’s how to make an alias to get there faster.

I now type $cdg in Macos Terminal.

If you are on Macos then let’s edit the bash config file.

$nano ~/.bashrc

alias cdg='cd ~/go/src/'

control+"o" and enter to save.

$source ~/.bashrc to execute the file in your terminal.

and yippee ki yay type $cdg and you should be taken to ~/go/src/

Another good resource for alias can be found here.