mirror of
https://github.com/m1ngsama/winfig.git
synced 2025-12-24 10:51:49 +00:00
36 lines
1.1 KiB
PowerShell
36 lines
1.1 KiB
PowerShell
# set PowerShell to UTF-8
|
|
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
|
|
|
|
Import-Module posh-git
|
|
$omp_config = Join-Path $PSScriptRoot ".\m1ng.omp.json"
|
|
oh-my-posh --init --shell pwsh --config $omp_config | Invoke-Expression
|
|
|
|
Import-Module -Name Terminal-Icons
|
|
|
|
# PSReadLine
|
|
Set-PSReadLineOption -EditMode Emacs
|
|
Set-PSReadLineOption -BellStyle None
|
|
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar
|
|
Set-PSReadLineOption -PredictionSource History
|
|
|
|
# Fzf
|
|
Import-Module PSFzf
|
|
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r'
|
|
|
|
# Env
|
|
$env:GIT_SSH = "C:\Windows\system32\OpenSSH\ssh.exe"
|
|
|
|
# Alias
|
|
Set-Alias -Name vim -Value nvim
|
|
Set-Alias ll ls
|
|
Set-Alias g git
|
|
Set-Alias grep findstr
|
|
Set-Alias tig 'C:\Users\m1ngsama\scoop\apps\git\2.47.1.2\usr\bin\tig.exe'
|
|
Set-Alias less 'C:\Users\m1ngsama\scoop\apps\git\2.47.1.2\usr\bin\less.exe'
|
|
|
|
# Utilities
|
|
function which ($command) {
|
|
Get-Command -Name $command -ErrorAction SilentlyContinue |
|
|
Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
|
|
}
|
|
|