vscode 终端git命令补全
时间: 2023-08-17 07:13:15 浏览: 814
在 VS Code 终端中使用 Git 命令补全,你可以按照以下步骤进行设置:
1. 打开 VS Code 并进入终端。
2. 确保已经安装了 Git,并且已经将其添加到系统的环境变量中。
3. 安装 Git 命令补全工具。你可以通过运行以下命令来安装:
```shell
git clone https://github.com/bobthecow/git-flow-completion.git
```
这将克隆 git-flow-completion 项目到你的本地。
4. 在 VS Code 中打开设置(快捷键为 `Ctrl + ,`)。
5. 在搜索框中输入 `terminal.integrated.shellArgs.windows`(如果你使用的是 Windows),或者 `terminal.integrated.shellArgs.osx`(如果你使用的是 macOS)。
6. 点击 "编辑 in settings.json",以编辑配置文件。
7. 在配置文件中添加以下内容:
```json
"terminal.integrated.shellArgs.windows": ["--command=git", "-i"],
```
或者
```json
"terminal.integrated.shellArgs.osx": ["-l"],
```
这会告诉终端在启动时加载 Git 命令补全工具。
8. 保存并关闭配置文件。
9. 重新启动 VS Code 的终端。
现在,当你在终端中输入 Git 命令时,应该可以自动补全命令和选项了。
阅读全文
相关推荐
















