Skip to content

Instantly share code, notes, and snippets.

@guizordan
Created January 12, 2026 18:45
Show Gist options
  • Select an option

  • Save guizordan/6e6720ef8f907ce7f04a7941c96cdd66 to your computer and use it in GitHub Desktop.

Select an option

Save guizordan/6e6720ef8f907ce7f04a7941c96cdd66 to your computer and use it in GitHub Desktop.
$PROFILE
# Use Linux-style keybindings
Set-PSReadLineOption -EditMode Emacs
# Optional: Make Tab completion feel more like Linux (list options)
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
function gs { git status }
function gpu { git pull }
function gpsh { git push }
function gcm { git commit -m $args }
function gco { git checkout $args }
function grb { git rebase -i HEAD~ }
function gsw { git switch $args }
Set-Alias c Clear-Host
Set-Alias vi nvim
Set-Alias vim nvim
Set-Alias neovim nvim
function Set-TerminalTitle {
$path = (Get-Location).Path
$short = Split-Path $path -Leaf
$host.UI.RawUI.WindowTitle = $short
}
function prompt {
Set-TerminalTitle
"PS $($executionContext.SessionState.Path.CurrentLocation)> "
}
# Word navigation
Set-PSReadLineKeyHandler -Key Ctrl+LeftArrow -Function BackwardWord
Set-PSReadLineKeyHandler -Key Ctrl+RightArrow -Function ForwardWord
# winget install JanDeDobbeleer.OhMyPosh
oh-my-posh init pwsh | Invoke-Expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment