My Windows Settings
# Aliases | |
Set-Alias open Invoke-Item | |
Set-Alias g git | |
# Set l and ls alias to use the new Get-ChildItemColor cmdlets | |
Import-Module Get-ChildItemColor | |
Set-Alias l Get-ChildItemColor -Option AllScope | |
Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope | |
# oh-my-posh | |
Import-Module -Name posh-git | |
Import-Module -Name oh-my-posh | |
Set-Theme agnoster | |
# Helper function to set location to the User Profile directory | |
function cuserprofile { Set-Location ~ } | |
Set-Alias ~ cuserprofile -Option AllScope | |
Set-PSReadlineOption -EditMode Emacs | |
Set-PSReadlineKeyHandler -Key 'Ctrl+p' -Function HistorySearchBackward | |
Set-PSReadlineKeyHandler -Key 'Ctrl+n' -Function HistorySearchForward | |
# Set git log charset | |
Set $Env:LESSCHARSET='utf-8' | |
Set-Item env:LANG -Value ja_JP.UTF-8 | |
function gh () { | |
cd $(ghq list --full-path | peco) | |
} | |
function U { | |
param | |
( | |
[int] $Code | |
) | |
if ((0 -le $Code) -and ($Code -le 0xFFFF)) | |
{ | |
return [char] $Code | |
} | |
if ((0x10000 -le $Code) -and ($Code -le 0x10FFFF)) | |
{ | |
return [char]::ConvertFromUtf32($Code) | |
} | |
throw "Invalid character code $Code" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment