Skip to content

Commit 89cefd6

Browse files
committed
chore: update docs
1 parent 0930642 commit 89cefd6

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

docs/usage/core-commands.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ Execute a command in a vfox managed environment.
203203
**Usage**
204204

205205
```shell
206-
vfox exec <sdk-name>[@<version>] <command> [args...]
206+
vfox exec <sdk-name>[@<version>] -- <command> [args...]
207207

208-
vfox x <sdk-name>[@<version>] <command> [args...]
208+
vfox x <sdk-name>[@<version>] -- <command> [args...]
209209
```
210210

211211
`sdk-name`: SDK name
@@ -227,20 +227,15 @@ The `exec` command allows you to temporarily execute commands in a specified SDK
227227
**Examples**
228228

229229
```shell
230-
# Execute command with project-configured nodejs version
231-
vfox exec nodejs node -v
232-
233230
# Execute command with specified version
234-
vfox exec nodejs@20.9.0 node -v
231+
vfox exec nodejs@20.9.0 -- node -v
235232

236233
# Run build in maven environment
237-
vfox exec maven@3.9.1 mvn clean install
234+
vfox exec maven@3.9.1 -- mvn clean install
238235

239236
# Use alias x (short for exec)
240-
vfox x java@21 java -version
237+
vfox x maven@3.9.1 -- mvn clean
241238

242-
# Execute command with multiple arguments
243-
vfox exec golang@1.21 go build -o myapp main.go
244239
```
245240

246241
::: tip IDE Integration
@@ -255,7 +250,7 @@ In VS Code, you can use the `exec` command to ensure your project uses the corre
255250
"label": "Run with Node.js",
256251
"type": "shell",
257252
"command": "vfox",
258-
"args": ["x", "nodejs@20", "node", "${file}"]
253+
"args": ["x", "nodejs@20", "--", "node", "${file}"]
259254
}
260255
]
261256
}

docs/zh-hans/usage/core-commands.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ vfox upgrade
205205
**用法**
206206

207207
```shell
208-
vfox exec <sdk-name>[@<version>] <command> [args...]
208+
vfox exec <sdk-name>[@<version>] -- <command> [args...]
209209

210-
vfox x <sdk-name>[@<version>] <command> [args...]
210+
vfox x <sdk-name>[@<version>] -- <command> [args...]
211211
```
212212

213213
`sdk-name`: SDK 名称
@@ -229,20 +229,16 @@ vfox x <sdk-name>[@<version>] <command> [args...]
229229
**示例**
230230

231231
```shell
232-
# 使用项目配置的 nodejs 版本执行命令
233-
vfox exec nodejs node -v
234232

235233
# 使用指定版本执行命令
236-
vfox exec nodejs@20.9.0 node -v
234+
vfox exec nodejs@20.9.0 -- node -v
237235

238236
# 在 maven 环境中执行构建
239-
vfox exec maven@3.9.1 mvn clean install
237+
vfox exec maven@3.9.1 -- mvn clean install
240238

241239
# 使用别名 x(exec 的简写)
242-
vfox x java@21 java -version
240+
vfox x maven@3.9.1 -- mvn clean
243241

244-
# 执行多个参数的命令
245-
vfox exec golang@1.21 go build -o myapp main.go
246242
```
247243

248244
::: tip IDE 集成
@@ -257,7 +253,7 @@ vfox exec golang@1.21 go build -o myapp main.go
257253
"label": "Run with Node.js",
258254
"type": "shell",
259255
"command": "vfox",
260-
"args": ["x", "nodejs@20", "node", "${file}"]
256+
"args": ["x", "nodejs@20", "--", "node", "${file}"]
261257
}
262258
]
263259
}

0 commit comments

Comments
 (0)