Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ben-wormald/goto
Jump to a project in your workspace by its initials
https://github.com/ben-wormald/goto
bash workspace
Last synced: 5 days ago
JSON representation
Jump to a project in your workspace by its initials
- Host: GitHub
- URL: https://github.com/ben-wormald/goto
- Owner: Ben-Wormald
- Created: 2020-08-06T13:05:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-29T08:55:43.000Z (almost 4 years ago)
- Last Synced: 2024-11-06T00:45:43.187Z (about 2 months ago)
- Topics: bash, workspace
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# goto
Command line tool to jump to a project in your workspace using its initials.
```bash
goto vsnb
~/code/vivo-stream-notification-bridge $
```## Install
Clone this repo, then add your configuration and an alias to your `.bashrc` or `.zshrc`.
```bash
export GOTO_WORKSPACE="$HOME/code"
export GOTO_IGNORE='professor-cam training'
alias goto="source $HOME/scripts/goto/goto.sh"
alias gocode="$HOME/scripts/goto/goto.sh -c"
```## Use
`goto` can be used to jump to a project in your workspace by its initials (where the folder name is hyphenated).
For example, `goto igm` is equivalent to `cd $GOTO_WORKSPACE/int-gel-matter`.Providing the full name of a project also works, for example `goto int-gel-matter`.
Using `goto` with no arguments will take you to the root of your workspace.
Use the `-c` flag to launch the project in VS Code, e.g. `goto -c igm`.
## Configure
`goto` uses a couple of environment variables to find your project folders.
`GOTO_WORKSPACE` should be the folder containing your projects.
If not specified, this defaults to your home directory.`GOTO_IGNORE` should be a space-separated list of folder in your workspace to ignore, in case of clashes.
For example, I'm using `'professor-cam training'` so that `goto pc` will match the `passport-control` project instead of `professor-cam`.
Note that you can still use the full name to bypass ignored projects, e.g. `goto professor-cam`.## Extend
If you want to include folders not in the root of your workspace you can add these to the case statement in the second half of the script.
I've got one set up already to jump to the `passport-control-activity` package within `passport-control`.