Navigate to aliased directories in your shell with tab completion.
gt lets you bookmark directories and jump to them instantly. No more typing long paths or spamming cd ../../../.
# Register a directory
gt -r dev ~/projects/development
# Jump to it
gt devTab completion shows all your aliases and their paths.
git clone https://github.com/mart337i/gt.git
cd gt
sudo ./installAdd this to your .bashrc or .zshrc:
source /path/to/gt.shRestart your shell after installation.
Navigate to alias:
gt <alias>Register alias:
gt -r <alias> <directory>
gt -r dots ~/.config
gt -r here . # current directoryList aliases:
gt -lUnregister alias:
gt -u <alias>Expand alias (show path):
gt -x <alias>Cleanup broken aliases:
gt -cPush/pop directory stack:
gt -p <alias> # push current, then goto alias
gt -o # pop backHelp:
gt -h# Setup
gt -r api ~/work/backend/api
gt -r web ~/sites/production
# Navigate
gt api
gt web/static
# Stack navigation
gt -p api # saves current location
gt -o # returns to saved location
# Cleanup
gt -c # remove dead aliasesAliases are stored in ~/.config/gt (or $XDG_CONFIG_HOME/gt).
To use a custom location:
export GT_DB="/path/to/your/alias/file"Run the test suite to verify everything works:
./tests/run_tests.shAll 15 tests should pass:
- Version and help commands
- Register/unregister/list aliases
- Navigation (both slash and space notation)
- Tab completion
- Push/pop directory stack
- Cleanup invalid aliases
- Deep path navigation
- Real-world workflows
Tests run automatically on every push via GitHub Actions.
zsh: command not found: compdef
Add to .zshrc:
autoload bashcompinit
bashcompinitMigrating from goto
Rename your config file:
mv ~/.config/goto ~/.config/gtOr point to the old file:
export GT_DB="$HOME/.config/goto"gt is a maintained fork of iridakos/goto by Lazarus Lazaridis.
The original project is no longer maintained. This fork continues development with a shorter command name and active maintenance.
- Fork it
- Create your feature branch (
git checkout -b my-feature) - Commit your changes (
git commit -am 'Add feature') - Push to the branch (
git push origin my-feature) - Run ShellCheck on your changes
- Create a Pull Request
MIT License - see LICENSE
Original project: iridakos/goto by Lazarus Lazaridis