-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMicrosoft.PowerShell_profile.ps1
58 lines (47 loc) · 1.53 KB
/
Microsoft.PowerShell_profile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.EXAMPLE
An example
存放路径: ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
.NOTES
General notes
## golang代理设置
set http_proxy='http://162.219.127.7:3128'
set https_proxy='https://162.219.127.7:3128'
git config --global http.proxy http://162.219.127.7:3128
git config --global https.proxy https://162.219.127.7:3128
#>
## 手动设置cmd属性中代码页为936
chcp 936
## 设置别名
## 下面这种形式也可以
## Set-Alias ll Get-ChildItem;
Set-Alias -Name ll -Value Get-ChildItem;
Set-Alias -Name dk -Value docker;
Set-Alias -Name dc -Value docker-compose;
## 加载公共函数, 有两种方法
## . .\toolkit.ps1 ## 相对路径貌似不合法
## . ~\Documents\WindowsPowerShell\toolkit.ps1;
Import-Module ~\Documents\WindowsPowerShell\toolkit.ps1;
Import-Module ~\Documents\WindowsPowerShell\env.ps1;
Import-Module ~\Documents\WindowsPowerShell\sysinfo.ps1;
Import-Module ~\Documents\WindowsPowerShell\net.ps1;
Import-Module ~\Documents\WindowsPowerShell\audio.ps1;
Import-Module ~\Documents\WindowsPowerShell\prompt.ps1;
#######################################################################################
<#
git, go get 可用, 但是只能在powershell终端中使用
#>
function enproxy {
param ()
EnvSet http_proxy http://127.0.0.1:1081;
EnvSet https_proxy http://127.0.0.1:1081;
}
function deproxy {
param ()
EnvSet http_proxy
EnvSet https_proxy
}