Skip to content

Commit

Permalink
docs: optimize docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Jan 8, 2025
1 parent 59c9990 commit 68bcef3
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 53 deletions.
56 changes: 29 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<h1>Alias Manager</h1>
<p>A vscode extension used to manage your system aliases</p>
<p>
<span>English</span> |
<a href="https://github.com/chouchouji/alias-manager/blob/main/README.zh-CN.md">中文介绍</a>
</p>
<p>
Expand All @@ -23,79 +24,80 @@
- 🔧 &nbsp;Support custom path that used to store aliases
- 🌍 &nbsp;Support internationalization

### TIP

If you don't know alias, I think it is very useful to read this [article](https://www.gnu.org/software/bash/manual/bash.html#Aliases).

## Usage
## TIP

> [!TIP]
> It does not support `windows`. If you have interest to adapt, welcome to submit pr.
### Create Alias
## Intro

You can create a new alias.
### Basic Usage

> [!TIP]
> Don't allow to create `duplicate` alias.
#### Create Alias

You can create a new alias by `+` icon. It will show an input where you can set your favorite alias.

The format of alias likes `gpl='git pull'`, `gpl` is alias name, `git pull` is alias command.

![add](https://github.com/user-attachments/assets/1af0175f-c5b2-4b1b-a5bb-26f48688f73f)

### Rename Alias
#### Run Alias

It supports renaming alias name and command for an alias.
Click `run` button, it will activate terminal and execute that command. Or, input the alias in terminal, the command will be executed.

![rename](https://github.com/user-attachments/assets/088510aa-d8dc-487b-bc17-a408579fa9d2)
> [!TIP]
> If the terminal shows error like `command not found`, reopen terminal and try again.
![run](https://github.com/user-attachments/assets/ad3f5b4d-f9d8-4eda-8b48-1b6f6a2705c5)

### Delete Alias
### Advanced Usage

It supports deleting all aliases or one alias.
#### Rename Alias

![delete](https://github.com/user-attachments/assets/5817a6e2-78ab-48bb-9a89-4bbb2d4379dc)
It supports renaming alias name and command for an alias.

### Run Alias
![rename](https://github.com/user-attachments/assets/088510aa-d8dc-487b-bc17-a408579fa9d2)

Click `run` button, it will activate terminal and execute that command.
#### Delete Alias

> [!TIP]
> If the terminal shows error like `command not found`, reopen terminal and try again.
It supports deleting all aliases or one alias.

![run](https://github.com/user-attachments/assets/ad3f5b4d-f9d8-4eda-8b48-1b6f6a2705c5)
![delete](https://github.com/user-attachments/assets/5817a6e2-78ab-48bb-9a89-4bbb2d4379dc)

### Copy Alias
#### Copy Alias

It supports copying an alias or all aliases in one group.

![copy](https://github.com/user-attachments/assets/23991d48-8de3-4a49-9dd9-f6ef6a6dd2b8)

### Group Alias
#### Group Alias

It support creating, deleting and renaming a new group, adding an alias to a group and removing an alias from a group.

All aliases are included in `System Aliases` which is data source. You can group different aliases by creating different groups. This is very helpful for you to quickly find aliases and operate aliases.

#### Create, Delete Or Rename Group
##### Create, Delete Or Rename Group

> [!TIP]
> Don't allow to create `duplicate` group.
![create-group](https://github.com/user-attachments/assets/1b9e6e22-3308-4ff6-9811-0c91ac416d7a)

#### Add Alias To Group Or Remove Alias From Group
##### Add Alias To Group Or Remove Alias From Group

![move-group](https://github.com/user-attachments/assets/9079a8cc-3be3-42a2-8c09-5b60aab64c07)

### Sort Alias
#### Sort Alias

![sort](https://github.com/user-attachments/assets/fb904718-c01d-416a-9c7a-4f6795cee2eb)

### Set Description
#### Set Description

You can set description for every alias. Clear input box to hide the description.

![description](https://github.com/user-attachments/assets/930dcf4f-6e62-4216-91ba-ca9d1de5c369)

### Set Store Path
#### Set Store Path

The default store path is `{homedir}/.zshrc`, like `~/.zshrc` or `/Users/chouchouji/.zshrc`. If you want to custom your alias store path, modify it by `Setting/Extensions/Alias Manager`

Expand Down
54 changes: 28 additions & 26 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<h1>Alias Manager</h1>
<p>管理系统别名的vscode插件</p>
<p>
<span>中文</span> |
<a href="https://github.com/chouchouji/alias-manager/blob/main/README.md">English Introduction</a>
</p>
<p>
Expand All @@ -25,77 +26,78 @@

## 提示

如果你不了解alias,可以先阅读这篇[文章](https://gnu-linux.readthedocs.io/zh/latest/Chapter01/00_alias.html?utm_source=chatgpt.com)

## 使用指南

> [!TIP]
> 此插件暂不支持 `windows`,如果你有兴趣实现,欢迎提交pr。
### 创建
## 介绍

支持创建新的别名
### 基础使用

> [!TIP]
> 别名不能重复
#### 创建

您可以通过 `+` 图标创建新别名,会显示一个输入框,可以在其中设置您喜欢的别名。

别名的格式类似于 `gpl='git-pull'``gpl` 是别名,`git pull` 是别名命令。

![add](https://github.com/user-attachments/assets/1af0175f-c5b2-4b1b-a5bb-26f48688f73f)

### 重命名
#### 运行

支持对已有别名的名称和指令名称重命名
点击“运行”按钮,它将激活终端并执行该命令。或者,在终端中输入别名,命令将被执行。

![rename](https://github.com/user-attachments/assets/088510aa-d8dc-487b-bc17-a408579fa9d2)
> [!TIP]
> 如果控制台报错 `command not found`, 先关闭控制台再执行。
![run](https://github.com/user-attachments/assets/ad3f5b4d-f9d8-4eda-8b48-1b6f6a2705c5)

### 删除
### 进阶使用

支持删除一个别名或者所有别名
#### 重命名

![delete](https://github.com/user-attachments/assets/5817a6e2-78ab-48bb-9a89-4bbb2d4379dc)
支持对已有别名的名称和指令名称重命名

### 运行
![rename](https://github.com/user-attachments/assets/088510aa-d8dc-487b-bc17-a408579fa9d2)

点击运行按钮,会在控制台执行该命令
#### 删除

> [!TIP]
> 如果控制台报错 `command not found`, 先关闭控制台再执行。
支持删除一个别名或者所有别名

![run](https://github.com/user-attachments/assets/ad3f5b4d-f9d8-4eda-8b48-1b6f6a2705c5)
![delete](https://github.com/user-attachments/assets/5817a6e2-78ab-48bb-9a89-4bbb2d4379dc)

### 复制
#### 复制

支持复制单个别名和分组下的所有别名

![copy](https://github.com/user-attachments/assets/23991d48-8de3-4a49-9dd9-f6ef6a6dd2b8)

### 分组
#### 分组

支持创建,删除,重命名分组,可以将别名添加或移出分组。

所有的别名都在 `System Aliases` 组下,这个是数据源。可以为不同的别名划分不同的组,这对于快速查找和操作别名很有帮助。

#### 创建、删除、重命名分组
##### 创建、删除、重命名分组

> [!TIP]
> 不允许创建 `名称相同的` 分组
![create-group](https://github.com/user-attachments/assets/1b9e6e22-3308-4ff6-9811-0c91ac416d7a)

#### 分组添加或移出别名
##### 分组添加或移出别名

![move-group](https://github.com/user-attachments/assets/9079a8cc-3be3-42a2-8c09-5b60aab64c07)

### 排序
#### 排序

![sort](https://github.com/user-attachments/assets/fb904718-c01d-416a-9c7a-4f6795cee2eb)

### 备注
#### 备注

支持为每个别名添加备注,清空输入框可以隐藏备注。

![description](https://github.com/user-attachments/assets/930dcf4f-6e62-4216-91ba-ca9d1de5c369)

### 存储路径
#### 存储路径

默认存储路径是 `{homedir}/.zshrc`, 比如 `~/.zshrc` 或者 `/Users/chouchouji/.zshrc`。 如果你想自定义存储路径, 可通过 `Setting/Extensions/Alias Manager` 修改。

Expand Down

0 comments on commit 68bcef3

Please sign in to comment.