Skip to content

Commit 275575d

Browse files
fix: rename command part 3
1 parent b8282ec commit 275575d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/advanced/custom-language.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ gcc -shared -fPIC -fno-exceptions -g -I 'src' -o mojo.so -O2 src/scanner.cc -xc
8686
## Register Language in `sgconfig.yml`
8787

8888
Once you have compiled the dynamic library for your custom language, you need to register it in the `sgconfig.yml` file.
89-
You can use the command [`sg new`](/guide/scan-project.html#create-scaffolding) to create a project and find the configuration file in the project root.
89+
You can use the command [`ast-grep new`](/guide/scan-project.html#create-scaffolding) to create a project and find the configuration file in the project root.
9090

9191
You need to add a new entry under the `customLanguages` key with the name of your custom language and some properties:
9292

@@ -120,7 +120,7 @@ Now you are ready to use your custom language with ast-grep! You can use it as a
120120
For example, to search for all occurrences of `print` in mojo files, you can run:
121121

122122
```bash
123-
sg -p "print" -l mojo
123+
ast-grep -p "print" -l mojo
124124
```
125125

126126
Or you can write a rule in yaml like this:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy