Last active
October 18, 2021 16:44
-
-
Save squarepegsys/e1641cefdfefba4e14b2 to your computer and use it in GitHub Desktop.
Powershell setup
This file contains hidden or 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
# 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