-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMicrosoft.PowerShell_profile.ps1
More file actions
110 lines (96 loc) · 2.57 KB
/
Microsoft.PowerShell_profile.ps1
File metadata and controls
110 lines (96 loc) · 2.57 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Set-PSReadlineOption -BellStyle None
Set-PSReadlineOption -EditMode Emacs
function ThemeLight() {
Set-PSReadLineOption -Colors @{
ContinuationPrompt = "#666666"
Emphasis = "#666666"
Error = "#cc0000"
Selection = "#666666"
Default = "#666666"
Comment = "#666666"
Keyword = "#666666"
String = "#008888"
Operator = "#666666"
Variable = "#008800"
Command = "#880088"
Parameter = "#666666"
Type = "#666666"
Number = "#666666"
Member = "#666666"
}
$x = $Host.PrivateData
$x.ErrorForegroundColor = "Red"
$x.ErrorBackgroundColor = "Black"
$x.WarningForegroundColor = "Yellow"
$x.WarningBackgroundColor = "Black"
$x.DebugForegroundColor = "Yellow"
$x.DebugBackgroundColor = "Black"
$x.VerboseForegroundColor = "Yellow"
$x.VerboseBackgroundColor = "Black"
$x.ProgressForegroundColor = "DarkGray"
$x.ProgressBackgroundColor = "Black"
}
function ThemeDark() {
Set-PSReadLineOption -Colors @{
ContinuationPrompt = "#cccccc"
Emphasis = "#cccccc"
Error = "#cccccc"
Selection = "#cccccc"
Default = "#cccccc"
Comment = "#cccccc"
Keyword = "#cccccc"
String = "#cccccc"
Operator = "#cccccc"
Variable = "#cccccc"
Command = "#cccccc"
Parameter = "#cccccc"
Type = "#cccccc"
Number = "#cccccc"
Member = "#cccccc"
}
$x = $Host.PrivateData
$x.ErrorForegroundColor = "Red"
$x.ErrorBackgroundColor = "Black"
$x.WarningForegroundColor = "Yellow"
$x.WarningBackgroundColor = "Black"
$x.DebugForegroundColor = "Yellow"
$x.DebugBackgroundColor = "Black"
$x.VerboseForegroundColor = "Yellow"
$x.VerboseBackgroundColor = "Black"
$x.ProgressForegroundColor = "DarkGray"
$x.ProgressBackgroundColor = "Black"
}
function g() {
git status $args
}
$esc = [char]27
$bold = "$esc[1m"
function __install.eza {
winget install eza-community.eza
}
if (Get-Command eza -ErrorAction SilentlyContinue) {
Set-Alias ls eza -Option AllScope
function ll() {
eza -l $args
}
} else {
Set-Alias l ls
Set-Alias ll ls
}
function prompt {
Write-Host ""
Write-Host -NoNewline -ForegroundColor Green "${bold}${pwd} "
Write-Host -NoNewline -ForegroundColor Magenta "${bold}->"
return " "
}
function .. {
Set-Location ..
}
function s {
Set-Location ..
Write-Output (Get-Location).Path
}
function FixGitOnWindows() {
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"
}
ThemeLight