Import-Module -Name PSReadLine
Import-Module -Name Terminal-Icons
Import-Module -Name PSFzf
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
Invoke-Expression (&starship init powershell)
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -Colors @{ InlinePrediction = '#888888' }
Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function ForwardWord
Set-PSReadLineKeyHandler -Chord "Ctrl+Spacebar" -Function ForwardChar
$env:FORCE_COLOR = 1
function host {
param ($IpOrHostname)
$ErrorActionPreference = 'stop'
$Answer = Resolve-DnsName $IpOrHostname
Write-Output $Answer;
}
function Remove-LocalGitBranchesExceptMain {
git branch | ForEach-Object {
$_ = $_.Trim()
if ($_ -ne "main" -and $_ -ne "* main") {
git branch -D $_
}
}
}