Last active
June 25, 2019 20:11
-
-
Save sebagomez/0ce365570d9c8494442ce5e2a5da074c to your computer and use it in GitHub Desktop.
PowerShell Profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://gist.github.com/jchandra74/5b0c94385175c7a8d1cb39bc5157365e | |
function ccode { Set-Location c:\code } | |
# Helper function to set location to the User Profile directory | |
function cuserprofile { Set-Location ~ } | |
Set-Alias ~ cuserprofile -Option AllScope | |
# Ensure posh-git is loaded | |
Import-Module -Name posh-git | |
# Ensure oh-my-posh is loaded | |
Import-Module -Name oh-my-posh | |
if (-not $?){ | |
Write-Warning "I think you might need to install NuGet and the needed modules. Please run the following commands:" | |
Write-Host "1) Install-PackageProvider NuGet -MinimumVersion '2.8.5.201' -Force" | |
Write-Host "2) Set-PSRepository -Name PSGallery -InstallationPolicy Trusted" | |
Write-Host "3) Install-Module -Name 'posh-git'" | |
Write-Host "4) Install-Module -Name 'oh-my-posh'" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment