Created
April 2, 2019 15:12
-
-
Save chrismay/7fa209c25ab33cb21e085ad9652e535a to your computer and use it in GitHub Desktop.
PS 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
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