Skip to content

Commit 9452b91

Browse files
fix: rename command name part 6
1 parent 06cf516 commit 9452b91

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

website/advanced/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The encoding difference may cause different fallback parsing during [error recov
4646
To debug the issue, you can use the [`--debug-query`](/reference/cli/run.html#debug-query-format) in the CLI to see the parsed AST nodes and meta variables.
4747

4848
```sh
49-
sg run -p <PATTERN> --debug-query ast
49+
ast-grep run -p <PATTERN> --debug-query ast
5050
```
5151

5252
The debug output will show the parsed AST nodes and you can compare them with the [Playground](/playground.html). You can also use different debug formats like `cst` or `pattern`.

website/catalog/typescript/redundant-usestate-type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ We can usually skip annotating if the generic type argument is a single primitiv
1313

1414
::: code-group
1515
```bash [number]
16-
sg -p 'useState<number>($A)' -r 'useState($A)' -l ts
16+
ast-grep -p 'useState<number>($A)' -r 'useState($A)' -l ts
1717
```
1818

1919
```bash [string]
20-
sg -p 'useState<string>($A)' -r 'useState($A)'
20+
ast-grep -p 'useState<string>($A)' -r 'useState($A)'
2121
```
2222

2323
```bash [boolean]
24-
sg -p 'useState<boolean>($A)' -r 'useState($A)'
24+
ast-grep -p 'useState<boolean>($A)' -r 'useState($A)'
2525
```
2626
:::
2727

website/guide/tools/json.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Composability is a key perk of command line tooling. ast-grep is no exception.
77
**Example:**
88

99
```bash
10-
sg run -p 'Some($A)' -r 'None' --json
10+
ast-grep run -p 'Some($A)' -r 'None' --json
1111
```
1212

1313
## Output Data Structure
@@ -124,7 +124,7 @@ ast-grep embraces the Unix philosophy of composability. The `--json` flag is des
124124

125125
For example, you can use [jq](https://stedolan.github.io/jq/) to extract information from the results and render it in [jless](https://jless.io/).
126126
```bash
127-
sg run -p 'Some($A)' -r 'None' --json | jq '.[].replacement' | jless
127+
ast-grep run -p 'Some($A)' -r 'None' --json | jq '.[].replacement' | jless
128128
```
129129

130130
You can also see [an example](https://github.com/ast-grep/ast-grep/issues/1232#issuecomment-2181747911) of using `--json` flag in Vim's QuickFix window.
@@ -140,7 +140,7 @@ To avoid this problem, you can use the `--json=stream` option when running ast-g
140140
The output of `--json=stream` looks like below:
141141

142142
```
143-
$ sg -p pattern --json=stream
143+
$ ast-grep -p pattern --json=stream
144144
{"text":"Some(matched)", ... }
145145
{"text":"Some(matched)", ... }
146146
{"text":"Some(matched)", ... }

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