Skip to content

Instantly share code, notes, and snippets.

@isalgueiro
Last active July 17, 2017 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isalgueiro/a782c0c34f0f3eda386624917f599e54 to your computer and use it in GitHub Desktop.
Save isalgueiro/a782c0c34f0f3eda386624917f599e54 to your computer and use it in GitHub Desktop.
Windows PowerShell profile setup
$env:LC_ALL="C.UTF-8"
. $env:LOCALAPPDATA\GitHub\shell.ps1
. $env:github_posh_git\profile.example.ps1
. (Join-Path -Path (Split-Path -Parent -Path $PROFILE) -ChildPath $(switch($HOST.UI.RawUI.BackgroundColor.ToString()){'White'{'Set-SolarizedLightColorDefaults.ps1'}'Black'{'Set-SolarizedDarkColorDefaults.ps1'}default{return}}))
@isalgueiro
Copy link
Author

This is to handle git output (https://stackoverflow.com/questions/41139067/git-log-output-encoding-issues-on-windows-10-command-prompt)

$env:LC_ALL="C.UTF-8"

This to load git related stuff, including printing git info in the prompt (https://github.com/dahlbyk/posh-git)

. $env:LOCALAPPDATA\GitHub\shell.ps1
. $env:github_posh_git\profile.example.ps1

And this to load Solarized theme (https://github.com/neilpa/cmd-colors-solarized)

. (Join-Path -Path (Split-Path -Parent -Path $PROFILE) -ChildPath $(switch($HOST.UI.RawUI.BackgroundColor.ToString()){'White'{'Set-SolarizedLightColorDefaults.ps1'}'Black'{'Set-SolarizedDarkColorDefaults.ps1'}default{return}}))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment