Skip to content

Instantly share code, notes, and snippets.

@joshua
Last active December 16, 2015 14:09
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 joshua/5446846 to your computer and use it in GitHub Desktop.
Save joshua/5446846 to your computer and use it in GitHub Desktop.
# Default PowerShell Profile
#
# ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
#
# Remote script execution must be enabled.
# Get-ExecutionPolicy should return RemoteSigned or Unrestricted
#
# If no, run the following as Administrator:
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
#
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
. $env:github_posh_git\profile.example.ps1
Set-Alias subl 'C:\Program Files\Sublime Text 2\sublime_text.exe'
function cdst { Set-Location \Projects\Stratus }
function touch { Set-Content -Path ($args[0]) -Value ($null) }
# Sanity
Set-Alias ll Get-ChildItem
#Set-Alias pwd Get-Location
# Git Aliases
function _git_status { git status }
Set-Alias gst _git_status
# Edit Profile
function Edit-Profile { subl $Profile }
Set-Alias ep Edit-Profile
# Live Reload Profile
function Reload-Profile {
@(
$Profile.AllUsersAllHosts,
$Profile.AllUsersCurrentHost,
$Profile.CurrentUserAllHosts,
$Profile.CurrentUserCurrentHost
) | % {
if(Test-Path $_) {
Write-Verbose "Running $_"
. $_
}
}
}
Set-Alias reload Reload-Profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment