docs: add winget command not fix tool and winget proxy guide
补充安装winget命令未找到提示工具的步骤,以及新增winget代理使用的配置教程
This commit is contained in:
parent
09da302a66
commit
bf43d4ae2a
@ -541,6 +541,9 @@ Install-Module PSFzf -Scope CurrentUser -Force
|
||||
|
||||
# 5. 安装 fzf 本体
|
||||
winget install junegunn.fzf
|
||||
|
||||
# 6. 安装 winget 命令未找到 提示工具
|
||||
Install-PSResource -Name Microsoft.WinGet.CommandNotFound
|
||||
```
|
||||
|
||||
#### PowerShell 5.1 安装依赖
|
||||
|
||||
@ -104,3 +104,33 @@ winget --proxy <url>
|
||||
winget --no-proxy
|
||||
```
|
||||
|
||||
#### 使用代理
|
||||
|
||||
##### 命令行参数(单次使用)
|
||||
|
||||
1. 开启配置(需要管理员权限)
|
||||
|
||||
```powershell
|
||||
winget settings --enable ProxyCommandLineOptions
|
||||
```
|
||||
|
||||
2. 使用
|
||||
|
||||
```powershell
|
||||
winget install Git.Git --proxy http://127.0.0.1:10809
|
||||
```
|
||||
|
||||
##### 管理员配置(全局生效)
|
||||
|
||||
开启配置(需要管理员权限)
|
||||
|
||||
```powershell
|
||||
winget settings set DefaultProxy http://127.0.0.1:10809
|
||||
```
|
||||
|
||||
关闭配置(需要管理员权限)
|
||||
|
||||
```powershell
|
||||
winget settings reset DefaultProxy
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user