Skip to content

Commit

Permalink
docs(README): update
Browse files Browse the repository at this point in the history
  • Loading branch information
abgox committed Aug 23, 2024
1 parent f55536f commit de9b15f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 26 deletions.
42 changes: 32 additions & 10 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,53 @@
- 动态排序补全项(根据使用频次)
- [提供了一个更好用的补全菜单](#关于补全菜单)

**如果 PSCompletions 对你有所帮助,请在此项目点个 Star ⭐**
**如果 `PSCompletions` 对你有所帮助,请在此项目点个 Star ⭐**

## 新的变化

请查阅 [更新日志](./module/CHANGELOG-CN.md)
- 请查阅 [更新日志](./module/CHANGELOG-CN.md)

## 安装

1. 打开 `PowerShell`
2. `Install-Module PSCompletions -Scope CurrentUser`
> - 除非你确定始终会使用管理员权限打开 `PowerShell`,否则不要省略 `-Scope CurrentUser`
3. `Import-Module PSCompletions`
2. 安装模块:

- 除非你确定始终会使用管理员权限打开 `PowerShell`,否则不要省略 `-Scope CurrentUser`

```powershell
Install-Module PSCompletions -Scope CurrentUser
```

- 静默安装:

```powershell
Install-Module PSCompletions -Scope CurrentUser -Repository PSGallery -Force
```

3. 导入模块:
```powershell
Import-Module PSCompletions
```
- 如果不想每次启动 `PowerShell` 都需要导入 `PSCompletions` 模块,你可以将导入语句写入 `$PROFILE`
- `echo "Import-Module PSCompletions" >> $PROFILE`
```powershell
echo "Import-Module PSCompletions" >> $PROFILE
```

## 卸载

1. 打开 `PowerShell`
2. `Uninstall-Module PSCompletions`
2. 卸载模块:
```powershell
Uninstall-Module PSCompletions
```

## 使用(以 `git` 补全为例)
## 使用

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

- 如果补全列表里没有你想要的补全,你可以 [提交 issues](https://github.com/abgox/PSCompletions/issues "点击提交 issues")
> 如果补全列表里没有你想要的补全,你可以 [提交 issues](https://github.com/abgox/PSCompletions/issues "点击提交 issues")
-`git` 补全为例

1. `psc add git`
2. 然后你就可以输入 `git`, 按下 `Space`(空格键) `Tab` 键来获得命令补全
Expand All @@ -83,7 +105,7 @@

## 贡献

- 请查阅 [CONTRIBUTING.md](./.github/contributing.md)
- 请查阅 [CONTRIBUTING](./.github/contributing.md)

## Tips

Expand Down
51 changes: 35 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,52 @@
- [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.
- Sort completion items dynamically by frequency of use.
- [It provides a better completion menu.](#about-completion-menu)
- [Provide a better completion menu.](#about-completion-menu)

**If this project is helpful to you, please consider giving it a star ⭐.**
**If `PSCompletions` is helpful to you, please consider giving it a star ⭐.**

## What's new

Please read the [CHANGELOG](./module/CHANGELOG.md).
- See the [CHANGELOG](./module/CHANGELOG.md) for details.

## How to install

1. Start `PowerShell`
2. `Install-Module PSCompletions -Scope CurrentUser`
> - Don't omit `-Scope CurrentUser` unless you're sure you'll always open `PowerShell` with administrator permissions.
3. `Import-Module PSCompletions`
- If you don't want to import the `PSCompletions` module every time you start `PowerShell`, you can write it to `$PROFILE`.
- `echo "Import-Module PSCompletions" >> $PROFILE`
1. Start `PowerShell`.
2. Install module:

- Don't omit `-Scope CurrentUser` unless you're sure you'll always start `PowerShell` with administrator permissions.
```powershell
Install-Module PSCompletions -Scope CurrentUser
```
- Install silently:
```powershell
Install-Module PSCompletions -Scope CurrentUser -Repository PSGallery -Force
```
3. Import module:
```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`.
```powershell
echo "Import-Module PSCompletions" >> $PROFILE
```
## How to uninstall
1. Start `PowerShell`
2. `Uninstall-Module PSCompletions`
1. Start `PowerShell`.
2. Uninstall module:
```powershell
Uninstall-Module PSCompletions
```

## How to use(e.g. `git`)
## How to use

### [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").
> 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").
- Take `git` as an example.

1. `psc add git`
2. Then you can enter `git`, press `Space` and `Tab` key to get command completion.
Expand All @@ -83,7 +102,7 @@ Please read the [CHANGELOG](./module/CHANGELOG.md).

## Contribution

Please read [CONTRIBUTING.md](./.github/contributing.md).
- See the [CONTRIBUTING](./.github/contributing.md) for details.

## Tips

Expand All @@ -103,14 +122,14 @@ Please read [CONTRIBUTING.md](./.github/contributing.md).

- Setting: `psc menu config menu_enable 1` (Default: `1`)

- The module's completion menu provided by the module is based on [PS-GuiCompletion](https://github.com/nightroman/PS-GuiCompletion) realization idea, thanks!
- The module's completion menu is based on [PS-GuiCompletion](https://github.com/nightroman/PS-GuiCompletion) realization idea, thanks!

- Available Windows environment:
- `PowerShell` <img src="https://img.shields.io/badge/module%20version-v4.0.0+-4CAF50" alt="v4.0.0+ support" />
- `Windows PowerShell` <img src="https://img.shields.io/badge/module%20version-v4.1.0+-4CAF50" alt="v4.1.0+ support" />
- Due to rendering problems of `Windows PowerShell`, the border style of the completion menu cannot be customized.
- If you need to customize it, use `PowerShell`.
- Some keys in the completion menu provided by the module.
- Some keys in the module's completion menu.

1. Apply the selected completion item: `Enter`
- You can also use `Tab` or `Space` when there's only one completion.
Expand Down

0 comments on commit de9b15f

Please sign in to comment.