Skip to content

Commit 139effa

Browse files
committed
feat: add gotoc to jump to code
1 parent dcb405d commit 139effa

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@ goto --owners --update
4646

4747
# Update the default dev directory
4848
goto --path --update
49+
50+
# Jump to a directory and open in code
51+
gotoc ajhenry/goto
4952
```
5053

54+
> `gotoc` is the same functionality with the added benefit of opening in vscode.
55+
5156
## Installation
5257

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

8590
```sh
86-
-> goto -h
91+
-> goto -h
8792
USAGE
8893
$ goto [PATH] [-l] [-p] [-u] [-d] [-i] [-v] [-o]
8994

src/lib/bash.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
export const gotoFunc = `
22
# Used for goto
33
goto() {
4-
goto-cli "$@" && cd $(cat ~/.goto/goto)
4+
goto-cli "$@" && eval $(cat ~/.goto/goto)
55
}
6-
`
6+
gotoc() {
7+
goto "$@" && code .
8+
}
9+
`

0 commit comments

Comments
 (0)