Skip to content

Instantly share code, notes, and snippets.

@dukex
Created October 8, 2021 10:21
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 dukex/02b2a983af1e3949cf4016c73ed25ab0 to your computer and use it in GitHub Desktop.
Save dukex/02b2a983af1e3949cf4016c73ed25ab0 to your computer and use it in GitHub Desktop.
Function gplr() {
git pull --rebase
}
Function gpsh() {
$branch = git rev-parse --abbrev-ref HEAD
git push -u origin $branch
}
function prompt() {
$currentFolder = Split-Path -Path $pwd -Leaf
$branch = git rev-parse --abbrev-ref HEAD
Write-host ($(if ($branch) { "$branch" } else { '' })) -ForegroundColor DarkBlue -NoNewline
Write-host ($(if ($branch) { " " } else { '' })) -NoNewline
Write-Host $currentFolder -NoNewline
return " > "
}
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment