Created
March 13, 2025 19:49
-
-
Save otto-gebb/38bd43dba71bf52ebfe1cb4fee342879 to your computer and use it in GitHub Desktop.
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
# winget install JanDeDobbeleer.OhMyPosh -s winget | |
# https://ohmyposh.dev/docs/installation/customize | |
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/unicorn.omp.json" | Invoke-Expression | |
# Install-Module -Name PSFzf | |
# https://github.com/kelleyma49/PSFzf/tree/master?tab=readme-ov-file#psfzf | |
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' | |
# choco install zoxide -y | |
Invoke-Expression (& { (zoxide init powershell | Out-String) }) | |
Set-PSReadLineKeyHandler -Chord "Ctrl+RightArrow" -Function ForwardWord | |
# choco install lsd -y | |
function la() { lsd -a } | |
function ll() { lsd -l --group-dirs first } | |
function l() { lsd } | |
function rmrf($x) { rm -Recurse -Force $x } | |
# For Git | |
function Get-GitBranch { | |
$branch = git rev-parse --abbrev-ref HEAD 2>$null | |
if (-not [string]::IsNullOrWhiteSpace($branch)) { | |
return $branch | |
} | |
else { | |
return "" | |
} | |
} | |
function gst() { git status } | |
function gd() { git diff } | |
function gaa() { git add --all } | |
function gpsup() { git push --set-upstream origin $(Get-GitBranch) } | |
function gpl() { git pull } | |
function gpra() { git pull --rebase --autostash } | |
function gprav() { git pull --rebase --autostash -v } | |
function gsw($branch) { git switch $branch } | |
function gswc($branch) { git switch --create $branch } | |
function gswd() { git switch develop } | |
function gswm() { git switch master } | |
function gca() { git commit --verbose --amend } | |
function gcan() { git commit --verbose --no-edit --amend } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment