Skip to content

Commit

Permalink
docs(README): update
Browse files Browse the repository at this point in the history
  • Loading branch information
abgox committed Dec 22, 2024
1 parent 926c92c commit 8ce68c0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
29 changes: 13 additions & 16 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@

## 介绍

> [!Note]
> [!Tip]
>
> - [`PowerShell`](https://github.com/PowerShell/PowerShell): 跨平台的 PowerShell。运行 `pwsh`/`pwsh.exe` 启动
> - [`Windows PowerShell`](https://learn.microsoft.com/powershell/scripting/what-is-windows-powershell): Windows 系统内置的 PowerShell。运行 `powershell`/`powershell.exe` 启动
> - 它们都可以使用 `PSCompletions`, 但是更推荐 [`PowerShell`](https://github.com/PowerShell/PowerShell)
---

- 一个 `PowerShell` 补全管理模块,更好、更简单、更方便的使用和管理补全
- [集中管理补全](#补全列表 "点击查看可添加补全列表!")
- `en-US`,`zh-CN`,... 多语言切换
Expand Down Expand Up @@ -81,22 +79,22 @@
```powershell
Import-Module PSCompletions
```
- 如果不想每次启动 `PowerShell` 都需要导入 `PSCompletions` 模块,你可以将导入语句写入 `$PROFILE`
- 如果不想每次启动 `PowerShell` 都需要导入 `PSCompletions` 模块,你可以使用以下命令将导入语句写入 `$PROFILE`
```powershell
echo "Import-Module PSCompletions" >> $PROFILE
```

> [!warning]
> [!Warning]
>
> - 导入 `PSCompletions` 后,就不要使用 `Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete`
> - 因为 `PSCompletions` 使用了它,如果再次使用,会覆盖 `PSCompletions` 中的设置,导致 `PSCompletions` 补全菜单无法正常工作
> - 你应该通过 `PSCompletions` 中的配置去设置它
> - 详细配置请参考 [关于补全触发按键](#关于补全触发按键)
>
> ```diff
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
>
> + Import-Module PSCompletions
>
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
> ```
## 卸载
Expand All @@ -109,12 +107,11 @@
## 使用

### [可用补全列表](#补全列表 "当前可添加的所有补全,更多的补全正在添加中!")

> [!Note]
> 如果补全列表里没有你想要的补全,你可以 [提交 issues](https://github.com/abgox/PSCompletions/issues "点击提交 issues")
> [!Tip]
>
> 也可以 [与 argc-completions 结合使用](https://pscompletions.pages.dev/tips/pscompletions-and-argc-completions "点击查看如何实现")
> - [可用补全列表](#补全列表 "当前可添加的所有补全,更多的补全正在添加中!")
> - 如果补全列表里没有你想要的补全,你可以 [提交 issues](https://github.com/abgox/PSCompletions/issues "点击提交 issues")
> - 也可以 [与 argc-completions 结合使用](https://pscompletions.pages.dev/tips/pscompletions-and-argc-completions "点击查看如何实现")
-`git` 补全为例

Expand All @@ -137,15 +134,15 @@
- 模块默认使用 `Tab` 键作为补全菜单触发按键
- 你可以使用 `psc menu config trigger_key <key>` 去设置它

> [!warning]
> [!Warning]
>
> - 导入 `PSCompletions` 后,就不要使用 `Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete`
> - 因为 `PSCompletions` 使用了它,如果再次使用,会覆盖 `PSCompletions` 中的设置,导致 `PSCompletions` 补全菜单无法正常工作
>
> ```diff
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
>
> + Import-Module PSCompletions
>
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
> ```
### 关于补全更新
Expand Down Expand Up @@ -218,7 +215,7 @@
### 关于特殊符号
> [!NOTE]
> [!Tip]
>
> - 由于未来的 Windows Terminal 的变化,将导致在补全菜单中无法正常显示 😄🤔😎,因此这三个默认特殊符号将改变。
> - 相关的 issue: https://github.com/microsoft/terminal/issues/18242
Expand Down
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@

## Introduce

> [!Note]
> [!Tip]
>
> - [`PowerShell`](https://github.com/PowerShell/PowerShell): A cross-platform PowerShell. Start it by running `pwsh`/`pwsh.exe`.
> - [`Windows PowerShell`](https://learn.microsoft.com/powershell/scripting/what-is-windows-powershell): A PowerShell which is built-in on Windows system. Start it by running `powershell`/`powershell.exe`.
> - They can both use `PSCompletions`, but [`PowerShell`](https://github.com/PowerShell/PowerShell) is more recommended.
---

- A completion manager in `PowerShell` for better and simpler use completions.
- [Manage completions together.](#available-completions-list "Click it to view the completion list that can be added.")
- Switch between languages(`en-US`,`zh-CN`,...) freely.
Expand Down Expand Up @@ -78,22 +76,22 @@
```powershell
Import-Module PSCompletions
```
- If you don't want to import the `PSCompletions` module every time when you start `PowerShell`, you can write it to `$PROFILE`.
- Add it to your `$PROFILE` to make it permanent by running the following command.
```powershell
echo "Import-Module PSCompletions" >> $PROFILE
```
> [!warning]
> [!Warning]
>
> - When using `PSCompletions`, don't use `Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete`.
> - Because `PSCompletions` uses it, if it's used again, it will overwrite the settings in `PSCompletions`, causing the `PSCompletions` completion menu to not work properly.
> - You should set it by the configuration in `PSCompletions`.
> - For detail configuration, see [About the completion trigger key](#about-the-completion-trigger-key).
>
> ```diff
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
>
> + Import-Module PSCompletions
>
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
> ```
## How to uninstall
Expand All @@ -106,12 +104,11 @@

## How to use

### [Available Completions](#available-completions-list "All completions that can be added at present. More completions are adding!")

> [!Note]
> If it doesn't include the completion you want, you can [submit an issue](https://github.com/abgox/PSCompletions/issues "Click to submit an issue.").
> [!Tip]
>
> You can also [combined with argc-completions.](https://pscompletions.pages.dev/tips/pscompletions-and-argc-completions "Click to see what you need to do.")
> - [Available Completions.](#available-completions-list "All completions that can be added at present. More completions are adding!")
> - If it doesn't include the completion you want, you can [submit an issue](https://github.com/abgox/PSCompletions/issues "Click to submit an issue.").
> - You can also [combined with argc-completions.](https://pscompletions.pages.dev/tips/pscompletions-and-argc-completions "Click to see what you need to do.")
- Take `git` as an example.

Expand All @@ -134,15 +131,15 @@
- `PSCompletions` uses the `Tab` key by default.
- You can set it by running `psc menu config trigger_key <key>`.

> [!warning]
> [!Warning]
>
> - When using `PSCompletions`, don't use `Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete`.
> - Because `PSCompletions` uses it, if it's used again, it will overwrite the settings in `PSCompletions`, causing the `PSCompletions` completion menu to not work properly.
>
> ```diff
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
>
> + Import-Module PSCompletions
>
> - Set-PSReadLineKeyHandler -Key <key> -Function MenuComplete
> ```
### About completion update
Expand Down Expand Up @@ -215,7 +212,7 @@
### About special symbols
> [!NOTE]
> [!Tip]
>
> - Due to future changes in Windows Terminal, 😄🤔😎 will not be displayed properly in the completion menu, so these three default special symbols will change.
> - Related issue: https://github.com/microsoft/terminal/issues/18242
Expand Down

0 comments on commit 8ce68c0

Please sign in to comment.