Skip to content

Commit

Permalink
feat: add gotoc to jump to code
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhenry committed Oct 2, 2023
1 parent dcb405d commit 139effa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ goto --owners --update

# Update the default dev directory
goto --path --update

# Jump to a directory and open in code
gotoc ajhenry/goto
```

> `gotoc` is the same functionality with the added benefit of opening in vscode.
## Installation

> You will also need [the github cli](https://cli.github.com/) in order to list and clone repos
Expand Down Expand Up @@ -83,7 +88,7 @@ If that also fails, it will ask if you want to create it.
The following flags are available:

```sh
-> goto -h
-> goto -h
USAGE
$ goto [PATH] [-l] [-p] [-u] [-d] [-i] [-v] [-o]

Expand Down
7 changes: 5 additions & 2 deletions src/lib/bash.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export const gotoFunc = `
# Used for goto
goto() {
goto-cli "$@" && cd $(cat ~/.goto/goto)
goto-cli "$@" && eval $(cat ~/.goto/goto)
}
`
gotoc() {
goto "$@" && code .
}
`

0 comments on commit 139effa

Please sign in to comment.