Skip to content

Instantly share code, notes, and snippets.

@MaxySpark
Created May 19, 2019 13:58
Show Gist options
  • Select an option

  • Save MaxySpark/0f21a3a4985107ee129d685d4c0d71ed to your computer and use it in GitHub Desktop.

Select an option

Save MaxySpark/0f21a3a4985107ee129d685d4c0d71ed to your computer and use it in GitHub Desktop.
code $PROFILE
# Ensure that Get-ChildItemColor is loaded
Import-Module Get-ChildItemColor
# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Set-Alias l Get-ChildItemColor -Option AllScope
Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope
# Helper function to show Unicode characters
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"
}
# Ensure posh-git is loaded
Import-Module -Name posh-git
# Ensure oh-my-posh is loaded
Import-Module -Name oh-my-posh
# Set the default prompt theme
Set-Theme paradox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment