-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMicrosoft.PowerShell_profile.ps1
61 lines (51 loc) · 1.23 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
59
60
61
Set-PSReadlineOption -BellStyle None
Set-PSReadlineOption -EditMode Emacs
Set-PSReadLineOption -Colors @{
Command = "Yellow"
Number = "Gray"
Member = "Gray"
Operator = "Gray"
Type = "Gray"
Variable = "Magenta"
Parameter = "Magenta"
ContinuationPrompt = "Gray"
Default = "Gray"
}
$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"
Set-Alias g "git status"
$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}pwsh:"
return " "
}
function .. {
Set-Location ..
}
function s {
Set-Location ..
Write-Output (Get-Location).Path
}