diff --git a/README.md b/README.md index a21db2e..d04b90f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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] diff --git a/src/lib/bash.ts b/src/lib/bash.ts index a43e77f..78fb653 100644 --- a/src/lib/bash.ts +++ b/src/lib/bash.ts @@ -1,6 +1,9 @@ export const gotoFunc = ` # Used for goto goto() { - goto-cli "$@" && cd $(cat ~/.goto/goto) + goto-cli "$@" && eval $(cat ~/.goto/goto) } -` \ No newline at end of file +gotoc() { + goto "$@" && code . +} +`