Skip to content

Instantly share code, notes, and snippets.

@jwc20
Last active July 29, 2024 23:20
Show Gist options
  • Save jwc20/141435b7595b8a0ca3b07158b1d9bccb to your computer and use it in GitHub Desktop.
Save jwc20/141435b7595b8a0ca3b07158b1d9bccb to your computer and use it in GitHub Desktop.
# https://hamidmosalla.com/2022/12/26/how-to-customize-windows-terminal-and-powershell-using-fzf-neovim-and-beautify-it-with-oh-my-posh/
# function prompt {"PS " + (get-location).drive.name+":\...\"+ $( ( get-item $pwd ).Name ) +">"}
function prompt {
$p = Split-Path -leaf -path (Get-Location)
"$p ~ "
}
Set-Alias vim nvim
Set-Alias vi nvim
Set-Alias ll ls
Set-Alias g git
Set-Alias grep findstr
Set-Alias lg lazygit
Set-Alias ng C:\Users\cjw\Desktop\ngrok\ngrok.exe
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
#Fzf (Import the fuzzy finder and set a shortcut key to begin searching)
Import-Module PSFzf
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r'
function which ($command) {
Get-Command -Name $command -ErrorAction SilentlyContinue |
Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment