Skip to content

Commit 5ba5510

Browse files
fix: update command name part 11
1 parent 868bab4 commit 5ba5510

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

website/reference/cli.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Command Line Reference
22

3-
You can always see up-to-date command line options using `sg --help`.
3+
You can always see up-to-date command line options using `ast-grep --help`.
44
ast-grep has several subcommands as listed below.
55

6-
## `sg run`
7-
Run one time search or rewrite in command line. This is the default command when you run `sg` so `sg -p 'foo()'` is equivalent to `sg run -p 'foo()'`. [View detailed reference.](/reference/cli/run.html)
6+
## `ast-grep run`
7+
Run one time search or rewrite in command line. This is the default command when you run the CLI, so `ast-grep -p 'foo()'` is equivalent to `ast-grep run -p 'foo()'`. [View detailed reference.](/reference/cli/run.html)
88

99
### Usage
1010

1111
```shell
12-
sg run [OPTIONS] --pattern <PATTERN> [PATHS]...
12+
ast-grep run [OPTIONS] --pattern <PATTERN> [PATHS]...
1313
```
1414

1515
### Arguments
@@ -42,13 +42,13 @@ sg run [OPTIONS] --pattern <PATTERN> [PATHS]...
4242
| -C| --context `<NUM>` | Show NUM lines around each match [default: 0] |
4343
|-h | --help | Print help |
4444

45-
## `sg scan`
45+
## `ast-grep scan`
4646
Scan and rewrite code by configuration. [View detailed reference.](/reference/cli/scan.html)
4747

4848
### Usage
4949

5050
```shell
51-
sg scan [OPTIONS] [PATHS]...
51+
ast-grep scan [OPTIONS] [PATHS]...
5252
```
5353

5454
### Arguments
@@ -87,13 +87,13 @@ sg scan [OPTIONS] [PATHS]...
8787
| -C| --context `<NUM>` | Show NUM lines around each match [default: 0] |
8888
| -h| --help|Print help|
8989

90-
## `sg test`
90+
## `ast-grep test`
9191
Test ast-grep rules. See [testing guide](/guide/test-rule.html) for more details. [View detailed reference.](/reference/cli/test.html)
9292

9393
### Usage
9494

9595
```shell
96-
sg test [OPTIONS]
96+
ast-grep test [OPTIONS]
9797
```
9898

9999
### Options
@@ -109,15 +109,15 @@ sg test [OPTIONS]
109109
| -i| --interactive |start an interactive review to update snapshots selectively.|
110110
| -h| --help |Print help.|
111111

112-
## `sg new`
112+
## `ast-grep new`
113113

114114
Create new ast-grep project or items like rules/tests. [View detailed reference.](/reference/cli/new.html)
115115

116116

117117
### Usage
118118

119119
```shell
120-
sg new [COMMAND] [OPTIONS] [NAME]
120+
ast-grep new [COMMAND] [OPTIONS] [NAME]
121121
```
122122

123123
### Commands
@@ -142,14 +142,14 @@ sg new [COMMAND] [OPTIONS] [NAME]
142142
| -b| `--base-dir <BASE_DIR>` | Create new project/items in the folder specified by this argument `[default: .]` |
143143
| -h| `--help` | Print help (see more with '--help') |
144144

145-
## `sg lsp`
145+
## `ast-grep lsp`
146146

147147
Start a language server to [report diagnostics](/guide/scan-project.html) in your project. This is useful for editor integration. See [editor integration](/guide/tools/editors.html) for more details.
148148

149149
### Usage
150150

151151
```shell
152-
sg lsp
152+
ast-grep lsp
153153
```
154154

155155
### Options
@@ -159,14 +159,14 @@ sg lsp
159159
| -c | --config `<CONFIG_FILE>`| Path to ast-grep root config, default is `sgconfig.yml` |
160160
| -h| `--help` | Print help (see more with '--help') |
161161

162-
## `sg completions`
162+
## `ast-grep completions`
163163

164164
Generate shell completion script.
165165

166166
### Usage
167167

168168
```shell
169-
sg completions [SHELL]
169+
ast-grep completions [SHELL]
170170
```
171171

172172
### Arguments
@@ -178,5 +178,5 @@ If not provided, shell flavor will be inferred from environment.
178178

179179
[possible values: bash, elvish, fish, powershell, zsh]
180180

181-
## `sg help`
181+
## `ast-grep help`
182182
Print help message or the help of the given subcommand(s).

website/reference/cli/new.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
outline: [2, 3]
33
---
44

5-
# `sg new`
5+
# `ast-grep new`
66

77
Create new ast-grep project or items like rules/tests. Also see the step by step [guide](/guide/scan-project.html).
88

99
## Usage
1010

1111
```shell
12-
sg new [COMMAND] [OPTIONS] [NAME]
12+
ast-grep new [COMMAND] [OPTIONS] [NAME]
1313
```
1414

1515
## Commands

website/reference/cli/run.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
outline: [2, 3]
33
---
44

5-
# `sg run`
5+
# `ast-grep run`
66

77
Run one time search or rewrite in command line.
8-
This is the default command when you run `sg` so `sg -p 'foo()'` is equivalent to `sg run -p 'foo()'`.
8+
This is the default command when you run the CLI, so `ast-grep -p 'foo()'` is equivalent to `ast-grep run -p 'foo()'`.
99

1010
## Usage
1111

1212
```shell
13-
sg run [OPTIONS] --pattern <PATTERN> [PATHS]...
13+
ast-grep run [OPTIONS] --pattern <PATTERN> [PATHS]...
1414
```
1515

1616
## Arguments

website/reference/cli/scan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
outline: [2, 3]
33
---
4-
# `sg scan`
4+
# `ast-grep scan`
55

66
Scan and rewrite code by configuration.
77

88
## Usage
99

1010
```shell
11-
sg scan [OPTIONS] [PATHS]...
11+
ast-grep scan [OPTIONS] [PATHS]...
1212
```
1313

1414
## Arguments

website/reference/cli/test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
outline: [2, 3]
33
---
44

5-
# `sg test`
5+
# `ast-grep test`
66

77
Test ast-grep rules.
88

99
## Usage
1010

1111
```shell
12-
sg test [OPTIONS]
12+
ast-grep test [OPTIONS]
1313
```
1414

1515
## Options

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