Skip to content

Instantly share code, notes, and snippets.

@HerbCaudill
Created August 12, 2019 15:48
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 HerbCaudill/cf995b4307b6767af7d1522e438cf99c to your computer and use it in GitHub Desktop.
Save HerbCaudill/cf995b4307b6767af7d1522e438cf99c to your computer and use it in GitHub Desktop.
My PowerShell profile. To edit yours type `code $profile`
# posh-git
Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-a4faccd\src\posh-git.psd1'
# set home directory
$HomeDir = "c:\git"
Set-Variable HOME $HomeDir -Force
(get-psprovider 'FileSystem').Home = $HomeDir
# $ESC = [char]27
# Aliases
Set-Alias git hub
Set-Alias sls serverless
function Open-Explorer-Here { explorer . }
Set-Alias x Open-Explorer-Here
function Build { yarn build }
Set-Alias b Build
function Start-Dev { yarn dev }
Set-Alias d Start-Dev
function Install { yarn install --silent }
Set-Alias i Install
function Start-App { yarn start }
Set-Alias s Start-App
function Test { yarn test --watch }
Set-Alias t Test
function Storybook { yarn storybook }
Set-Alias story Storybook
function Noop {}
Set-Alias y Noop
# Prompt
$GitPromptSettings.DefaultPromptPrefix = "`n`n"
$GitPromptSettings.DefaultPromptSuffix = "`n↯ "
$GitPromptSettings.DefaultForegroundColor = "DarkGray"
$GitPromptSettings.DefaultPromptAbbreviateHomeDirectory = $true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment