Skip to content

Instantly share code, notes, and snippets.

@chrismay
Created April 2, 2019 15:12
Show Gist options
  • Save chrismay/7fa209c25ab33cb21e085ad9652e535a to your computer and use it in GitHub Desktop.
Save chrismay/7fa209c25ab33cb21e085ad9652e535a to your computer and use it in GitHub Desktop.
PS Profile
if ($host.Name -eq 'ConsoleHost') {
Set-PSReadLineOption -EditMode Emacs
Set-PSReadlineOption -BellStyle None
}
# Ensure that Get-ChildItemColor is loaded
Import-Module Get-ChildItemColor
# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Set-Alias ll Get-ChildItemColor -Option AllScope
Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope
# Ensure posh-git is loaded
Import-Module -Name posh-git
# Ensure oh-my-posh is loaded
Import-Module -Name oh-my-posh
# Default the prompt to agnoster oh-my-posh theme
Set-Theme agnoster
#Zlocation
Import-Module ZLocation
Write-Host -Foreground Green "`n[ZLocation] knows about $((Get-ZLocation).Keys.Count) locations.`n"
Set-Alias z Invoke-ZLocation
#SQL commandline
Import-Module WFTools
function sql ([string] $query) {
Invoke-Sqlcmd2 -ServerInstance ".\SQLEXPRESS" -Database "tix.maindatabase" -Query $query
}
# Tix helpers
Import-Module c:\Users\Chris\tix-utils.psm1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment