Gogo - A Tool to Create Shortcuts to Lengthy Path Directories

make shortcuts directory path
In this article, I would like to tell about such interesting tool called gogo. It is used to bookmark any directory from your command line so that you don't have to remember long and complicated paths.

Installation

For this purposes, I will use Ubuntu 16.04

Download

$ https://github.com/mgoral/gogo/archive/master.zip

And unzip

$ unzip master.zip

Copy script to any directory included in your $PATH

$ mkdir -p ~/bin && cp gogo-master/gogo.py ~/bin/ && chmod +x ~/bin/gogo.py

Add function from script to .bashrc file and source it

$ cp gogo-master/gogo.sh ~/.gogo.sh && echo "source ~/.gogo.sh" >> ~/.bashrc

Usage

Let's start from help menu

$ gogo -h

gogo help

Configuration

gogo stores configuration file in ~/.config/gogo/gogo.conf

The syntax of this configuration file in quite easy. You can add comments starting with # and add aliases such

path = /full/path/to/directory

You can also add aliases for directories on another server using ssh. You can use common ssh format like '[email protected]' or an alias stored in ~/.ssh/config file

server1music = ssh://[email protected] /home/user/Music

or use the needed shell

server1music = ssh://[email protected]:bash /home/user/Music

otherwise the host computer shell will be used.

Example

Let's add some test config. For example alias for "Pictures" folder.

$ echo "pic = ~/Pictures" >> ~/.config/gogo/gogo.conf

Now execute

$ gogo pic

and you will get changed directory to ~/Pictures

This tool is very useful if you have a lot of directories with files and you do not want to remember all of the paths. For additional information, you can refer to GitHub project page.

About Pavlo Maiorchyk

Systems Administrator and hardware developer with 4 years of professional experience in IT. My goal is to deliver only best solutions and customer support.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.