pwsh-profile/README.md
Steven Hobs 24fc4e3d67 init
2025-05-27 05:42:50 +08:00

28 lines
1.5 KiB
Markdown

# My Profile of PowerShell on Windows / 我的 PowerShell 配置文件
## Description / 描述
This profile is simple but more productive when work in terminals. I just create a proxy switcher and some command alias.
这个配置文件简单,但是终端操作时会让你很有精神。我目前只作了代理切换和一些命令行缩略别名。
## Configure / 配置
### PreInstalled (Strongly Needed) / 预装的命令行程式 (必须的)
- `Starship` A Prompt for any shell. 支持各种 Shell 的终端提示优化 <https://github.com/starship/starship>
- `Zoxide` A smarter cd command. 更智能的 cd 命令 <https://github.com/ajeetdsouza/zoxide>
### Load the Profile / 载入配置
Two Ways for the profile, each one is ok! / 配置有两种方式,任意一种都可以。
1. Just copy the [Microsoft.PowerShell_profile.ps1](./Microsoft.PowerShell_profile.ps1) file content info Powershell Profile Directory! 只需要将[配置文件内容](./Microsoft.PowerShell_profile.ps1)拷贝到 Powershell 的 profile 文件夹里。
2. Git clone into Windows Document Directory if not exist profile dir. 如果没有配置文件夹,克隆这个仓库到系统的文档路径下
```powershell
cd ([System.Environment]::GetFolderPath('MyDocuments'))
git clone --depth 1 https://git.unvec.site/stevenhobs/pwsh-profile.git Powershell # Powershell 7
git clone --depth 1 https://git.unvec.site/stevenhobs/pwsh-profile.git WindowsPowershell # if you use old powershell
```