diff --git a/astro.config.mjs b/astro.config.mjs
index 597cf58..fe0be7e 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -57,6 +57,14 @@ export default defineConfig({
"en":"What's Supported?",
},
},
+ {
+ label: "Commands AutoCompletions",
+ link: '/starts/completions/',
+ translations:{
+ "zh-CN":"命令行自动补全",
+ "en":"Commands AutoCompletions",
+ },
+ },
],
},
{
diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx
index 7aca911..2c31408 100644
--- a/src/content/docs/index.mdx
+++ b/src/content/docs/index.mdx
@@ -22,27 +22,34 @@ hero:
- Lazy Worms
- Those always up for something new
-import { Card, CardGrid, Icon } from '@astrojs/starlight/components';
+import { Card, CardGrid, Icon } from "@astrojs/starlight/components";
## Features
-
- Supports Windows/MacOS/Linux.
-
-
- Supports thousands of [SDKs and Tools](/starts/sdklist/).
-
-
- Built with Terminal UI inspired by lazygit, more intuitive.
-
-
- Version lists for SDKs are cached in [vsources](https://github.com/gvcgo/vsources).
-
-
- No plugins needed, just out of the box.
-
-
- Supports locking SDK version for each project.
-
+
+ Supports Windows/MacOS/Linux.
+
+
+ Supports thousands of [SDKs and Tools](/starts/sdklist/).
+
+
+ Built with Terminal UI inspired by lazygit, more intuitive.
+
+
+ Supports CLI. Users can choose either CLI or GUI.
+
+
+ Version lists for SDKs are cached in
+ [vsources](https://github.com/gvcgo/vsources).
+
+
+ No plugins needed, just out of the box.
+
+
+ Supports locking SDK version for each project.
+
+
+ Auto completions for diffrent shells, like bash, zsh, powershell, etc.
+
diff --git a/src/content/docs/starts/completions.mdx b/src/content/docs/starts/completions.mdx
new file mode 100644
index 0000000..3208b50
--- /dev/null
+++ b/src/content/docs/starts/completions.mdx
@@ -0,0 +1,25 @@
+---
+title: Shell completions.
+description: Setup shell completions for vmr.
+---
+
+import { Tabs, TabItem, Aside } from "@astrojs/starlight/components";
+
+## Setup completions for diffrent shells.
+
+
+
+ vmr completion powershell >>
+ .\Documents\WindowsPowerShell\vmr_completions.ps1 # Add following line to
+ powershell profile at $HOME\Documents\WindowsPowerShell\profile.ps1
+ Import-Module -Name "$HOME\Documents\WindowsPowerShell\vmr_completions.ps1"
+
+
+ vmr completion bash >> ~/vmr_completions.sh # Add following line to bash
+ profile at $HOME/.bashrc source $HOME/vmr_completions.sh
+
+
+ vmr completion zsh >> ~/vmr_completions.sh # Add following line to zsh
+ profile at $HOME/.zshrc source $HOME/vmr_completions.sh
+
+
diff --git a/src/content/docs/zh-cn/index.mdx b/src/content/docs/zh-cn/index.mdx
index 573dfa9..8161755 100644
--- a/src/content/docs/zh-cn/index.mdx
+++ b/src/content/docs/zh-cn/index.mdx
@@ -16,33 +16,39 @@ hero:
icon: github
---
-## 什么人比较适合用VMR?
+## 什么人比较适合用 VMR?
- 多语言程序员
- 懒人
- 喜欢折腾新玩意的人
-import { Card, CardGrid, Icon } from '@astrojs/starlight/components';
+import { Card, CardGrid, Icon } from "@astrojs/starlight/components";
## 功能特点
-
- 支持 Windows/MacOS/Linux.
-
-
- 支持[数以千计的SDK](/zh-cn/starts/sdklist/)和编程工具.
-
-
- 受到lazygit启发,内置TUI,使用更符合直觉.
-
-
- 因为VMR的版本信息都缓存在[vsources](https://gitee.com/moqsien/vsources)仓库.
-
-
- 无需烦人的插件,开箱即用.
-
-
- 每个项目都可以锁定不同的SDK版本,编辑器或者IDE打开模拟终端时,自动切换至锁定版本.
-
+
+ 支持 Windows/MacOS/Linux.
+
+
+ 支持[数以千计的SDK](/zh-cn/starts/sdklist/)和编程工具.
+
+
+ 受到lazygit启发,内置TUI,使用更符合直觉.
+
+
+ 同时支持命令行模式,照顾更多用户的习惯.
+
+
+ 因为VMR的版本信息都缓存在[vsources](https://gitee.com/moqsien/vsources)仓库.
+
+
+ 无需烦人的插件,开箱即用.
+
+
+ 每个项目都可以锁定不同的SDK版本,编辑器或者IDE打开模拟终端时,自动切换至锁定版本.
+
+
+ 支持Shell命令自动补全. 目前支持的Shell有bash/zsh/powershell等.
+
diff --git a/src/content/docs/zh-cn/starts/completions.mdx b/src/content/docs/zh-cn/starts/completions.mdx
new file mode 100644
index 0000000..1117ba2
--- /dev/null
+++ b/src/content/docs/zh-cn/starts/completions.mdx
@@ -0,0 +1,27 @@
+---
+title: vmr命令行自动补全.
+description: 为vmr设置命令行自动补全.
+---
+
+import { Tabs, TabItem, Aside } from "@astrojs/starlight/components";
+
+## 设置命令行自动补全.
+
+
+
+ vmr completion powershell >>
+ .\Documents\WindowsPowerShell\vmr_completions.ps1 #
+ 将下面一行命令添加到Powershell的profile文件中($HOME\Documents\WindowsPowerShell\profile.ps1)
+ Import-Module -Name "$HOME\Documents\WindowsPowerShell\vmr_completions.ps1"
+
+
+ vmr completion bash >> ~/vmr_completions.sh #
+ 将下面一行命令添加到Bash的profile文件中($HOME/.bashrc): source
+ $HOME/vmr_completions.sh
+
+
+ vmr completion zsh >> ~/vmr_completions.sh #
+ 将下面一行命令添加到zsh的profile文件中($HOME/.zshrc): source
+ $HOME/vmr_completions.sh
+
+