GoGo: Complicated Path Shortcuts for Linux

Road sign with shortcuts

On many occasions, you may be using paths to files or directories that are quite long or complicated to remember. At other times, they may be difficult to enter because they have weird unicode characters, spaces, or you are simply lazy to type them in full. To shorten paths you can use programs like GoGo that will allow you to create short paths for your most used files.

For that, GoGo behaves like the tool to create aliases which has Linux. In the same way that you create aliases for your commands, you can also create a short and intuitive name for any path that you use frequently and do not feel like entering the whole thing. To do this, the first thing you must have installed is this program I'm talking about. It's free, open source, written in Python, and available on Github.

For, install it, you must follow the following steps:

git clone https://github.com/mgoral/gogo.git
cd gogo/
mkdir -p ~/bin
cp gogo.py ~/bin/
cat gogo.sh >> ~/.bashrc

After that it would be installed and ready to go in your favorite distribution. As you can see, the procedure is general for any distro, it does not vary depending on whether you have one system or another.

But before you start using, you must configure it with the routes you want shorten. But it is very simple. Just go to the file ~ / .config / gogo / gogo.conf. That is the main configuration file for GoGo. With any text editor you use regularly, open it to start editing it with the shortcuts you need. For example, imagine you want to create the following path aliases and leave a directory as the default path:

# Comentarios comienzan con # para que sean ignorados
default = ~/aqui/la/ruta/predeterminada
alias1 = /la/ruta/que/quieras/acortar
alias2 = /otra/de/las/rutas/que/quieras/acortar

Now, you would already have a default route in which it will always be positioned by default and two more aliases. Remember that instead of alias1, alias2, etc., you can use whatever names you want. To go to one of these routes, the way is very simple, just using the alias name you have used. For example:

gogo alias1

By the way, if you want create an alias of a route you are on quickly, you can use the command "gogo -a alias" without quotes. Replace the alias with the name you want to give it and it will be added to the configuration file ...


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

A comment, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   edkalrio said

    GoGo is a totally superfluous and expendable program. It aims to supplant Bash builtins with an inferior, less portable and non-standardized alternative. In the spirit of the programmer to reinvent the wheel, forget how easy it is to achieve the functionality it offers with simple commands. It is much more advisable to stick to the usual uses of systems administration and learn Bash than to use this kind of Rube Goldberg machine without grace or value.

    Paraphrasing the author:
    But before you start using it, you must configure it with the routes you want to shorten. But it is very simple. Just go to the ** ~ / .bashrc ** file. That is the main configuration file for ** Bash **. With any text editor you use regularly, open it to start editing it with the shortcuts you need. For example, imagine you want to create the following path aliases and leave a directory as the default path:

    #Comments start with # to be ignored
    cd ~ / here / the / default / path
    alias1 = »/ the / path / you / want / to shorten»
    alias2 = »/ other / of / the / routes / you / want / to shorten»

    Now, you would already have a default route in which it will always be positioned by default and two more aliases. Remember that instead of alias1, alias2, etc., you can use whatever names you want. To go to one of these routes, the way is very simple, simply using the alias name that you have used. For example:

    cd $ alias1

    By the way, if you want to create an alias of a route that you are on quickly, you can use the command

    echo "alias = \" $ (pwd) \ "" >> ~ / .bashrc