-
Notifications
You must be signed in to change notification settings - Fork 0
/
Microsoft.PowerShell_profile.ps1
45 lines (40 loc) · 1.4 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
Set-Alias rm rm.exe
Set-Alias find $HOME\scoop\shims\find.exe
Set-Alias lg lazygit
Set-Alias ls real_ls
Set-Alias cat real_cat
Set-Alias sudo gsudo
Set-Alias ar llvm-ar
Set-Alias strings llvm-strings
Set-Alias strip llvm-strip
Set-Alias bash C:\Users\Joey\scoop\shims\bash.exe
function .. { Set-Location ".." }
function ... { Set-Location "../.." }
function .... { Set-Location "../../.." }
function ..... { Set-Location "../../../.." }
function real_ls { busybox ls --color --group-directories-first -AA $args }
function l { busybox ls --color --group-directories-first -AAlh $args }
function real_cat { bat -P $args }
function ln { sudo New-Item -ItemType SymbolicLink -Path $args[1] -Target $args[0] }
function convert { magick convert $args }
function tree { tree.exe -aCI .git --dirsfirst $args }
function objdump { llvm-objdump -M intel $args }
Import-Module gsudoModule
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
Set-PSReadlineOption -EditMode vi
function promptpath {
$path = Get-Location
$path = $path.Path
$path = $path.Replace($HOME, '~')
$path = $path.Replace('\', '/')
return $path
}
function prompt {
Write-Host "$($env:username)@$(hostname) " -ForegroundColor Green -NoNewLine
Write-Host "$(promptpath) `$" -ForegroundColor Blue -NoNewLine
return ' '
}
$env:CARGO_REGISTRIES_CRATES_IO_PROTOCOL = "sparse"
$env:PF_SOURCE = "$HOME\.config\pfetch.conf"
pfetch