LinuxCommandLibrary

goto

Directory navigation with aliases

TLDR

Register current directory
$ goto -r [alias-name]
copy
Navigate to aliased directory
$ goto [alias-name]
copy
List all aliases
$ goto -l
copy
Unregister an alias
$ goto -u [alias-name]
copy

SYNOPSIS

goto [options] [alias]

DESCRIPTION

goto is a directory navigation tool that allows users to create aliases for frequently accessed directories. It provides tab completion and quick jumping between projects.
The tool integrates with the shell (bash, zsh, fish) and provides fast navigation without typing long paths.

PARAMETERS

-r, --register ALIAS

Register current directory as alias
-u, --unregister ALIAS
Unregister alias
-l, --list
List all registered aliases
-c, --clean
Remove non-existent directory aliases
-x, --expand ALIAS
Print alias path
-p, --push
Use pushd instead of cd
-v, --version
Display version and exit
-h, --help
Display help and exit

EXAMPLES

$ goto -r proj      # Register current dir as 'proj'
goto proj         # Jump to ~/projects/myproject
goto -l           # List: proj -> ~/projects/myproject
goto -u proj      # Remove alias
copy

SHELL INTEGRATION

Add to shell configuration:
Bash/Zsh:

$ eval "$(goto -r)"
copy
Fish:
$ goto -r | source
copy

CAVEATS

Requires shell integration. Aliases are stored in user's home directory. Tab completion requires shell setup.

HISTORY

goto was inspired by similar tools like z.lua and autojump, focusing on simplicity and alias-based navigation.

SEE ALSO

[z.lua](https://github.com/skywind3000/z.lua), [autojump](https://github.com/wting/autojump), [zoxide](https://github.com/ajeetdsouza/zoxide)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard