Bash Shortcut

- Bash

My dev environment for go is nested deep.

$cd ~/go/src/github.com/ryderpro/

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/github.com/ryderpro/'

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/github.com/ryderpro/.

Another good resource for alias can be found here.