A simple shell function to manage and navigate to custom directory mappings.
- Clone the repository to your local machine:
git clone https://github.com/luisya22/goto.git
- Source the goto.sh script in your .bashrc file:
echo "source /path/to/goto/goto.sh" >> ~/.bashrc
# Replace /path/to/goto with the actual absolute path where the goto repository is cloned
# For example, if it is at home: ~/goto/goto.sh
- Reload your .bashrc file:
source ~/.bashrc
- Add a new mapping:
goto add <entry_name> <folder_path>
- You may also use
$(pwd)
if you are currently in the folder you want to add:goto add <entry_name> $(pwd)
- You may also use
- Remove a mapping:
goto remove <entry_name>
- Update a mapping:
goto update <entry_name> <new_path>
- List all mappings:
goto list
- Navigate to a mapping:
goto <entry_name>
The goto function supports autocompletion for the names of your custom mappings.
goto add projects ~/Documents/Projects/MyFavoriteProject/Inside/SuperInside
goto projects
This will navigate to ~/Documents/Projects/MyFavoriteProject/Inside/SuperInside.