Skip to content

Instantly share code, notes, and snippets.

@squarepegsys
Last active October 18, 2021 16:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save squarepegsys/e1641cefdfefba4e14b2 to your computer and use it in GitHub Desktop.
Save squarepegsys/e1641cefdfefba4e14b2 to your computer and use it in GitHub Desktop.
Powershell setup
# install Github Desktop to get their config
# then you can do this
# https://desktop.github.com/
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
# then install psget and install modules
# before putting these lines in here
# see https://github.com/psget/psget
Import-Module PowerLs
Import-Module Find-String
Import-Module PSReadline
Import-Module posh-git
#Bash-like prompt
Set-PSReadlineOption -EditMode Emacs
Enable-GitColors
Pop-Location
Start-SshAgent -Quiet
$oldPath=$env:Path
$env:Path = $newPath
# Can't alias to a command and aliases
# so make them functions
function gss {
git status --short
}
function ack($str,$pat) {
perl ~/bin/ack.pl $str $pat
}
Set-Alias -Name ls -Value PowerLS -Option AllScope
New-Alias which get-command
Set-Alias -Name gsl -Value git-smart-log -Option AllScope
Set-Alias -Name gsm -Value "git-smart-merge" -Option AllScope
Set-Alias -Name gup -Value "git-smart-pull" -Option AllScope
Set-Alias -Name r -Value Invoke-History -Option AllScope
Set-Alias -Name c -Value clear -Option AllScope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment