Created
May 15, 2026 15:18
-
-
Save zirconias/5225b9e42fdf8b2da85be4956b0d0a20 to your computer and use it in GitHub Desktop.
profile ps1
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
| #[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding | |
| #Write-Output hello | |
| Set-Alias ll ls | |
| Set-Alias g git | |
| Set-Alias vim nvim | |
| Set-Alias grep findstr | |
| Set-Alias c clear | |
| #ii . ->Invoke-Item . -> explorer . | |
| # Set-Alias tig | |
| # Set-Alias less | |
| Import-Module posh-git | |
| Import-Module Terminal-Icons | |
| Import-Module PSFzf | |
| Import-Module z | |
| #Import-Module CompletionPredictor | |
| # $omp_config = Join-Path $PSScriptRoot ".\my.omp.json" | |
| # oh-my-posh --init --shell pwsh --config $omp_config | Invoke-Expression | |
| #Set-PoshPrompt Paradox | |
| #Set-PoshPrompt agnoster | |
| # Set-PoshPrompt agnoster | |
| #oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression | |
| # oh-my-posh init pwsh --config 'C:/Users/Ztallion/ztall.omp.json' | Invoke-Expression | |
| # oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\tokyo.omp.json" | Invoke-Expression | |
| oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\agnoster.omp.json" | Invoke-Expression | |
| Invoke-Expression (& { (zoxide init powershell --cmd cd | Out-String) }) | |
| # Env | |
| $env:GIT_SSH = "C:\Windows\system32\OpenSSH\ssh.exe" | |
| $env:FZF_DEFAULT_OPTS='--height 60% --layout=reverse --border' | |
| Set-PSReadLineOption -EditMode Windows | |
| Set-PSReadLineOption -BellStyle None | |
| # Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar | |
| # Set-PSReadLineKeyHandler -Chord 'Ctrl+d,Ctrl+c' -Function CaptureScreen | |
| Set-PSReadLineOption -PredictionSource History | |
| Set-PSReadLineOption -PredictionViewStyle ListView | |
| Set-PSReadLineKeyHandler -Key Alt+d -Function ShellKillWord | |
| Set-PSReadLineKeyHandler -Key Alt+Backspace -Function ShellBackwardKillWord | |
| Set-PSReadLineKeyHandler -Key Alt+b -Function ShellBackwardWord | |
| Set-PSReadLineKeyHandler -Key Alt+f -Function ShellForwardWord | |
| Set-PSReadLineKeyHandler -Key Alt+B -Function SelectShellBackwardWord | |
| Set-PSReadLineKeyHandler -Key Alt+F -Function SelectShellForwardWord | |
| Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r' | |
| # Utilities | |
| function which2 ($command) { | |
| Get-Command -Name $command -ErrorAction SilentlyContinue | | |
| Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue | |
| } | |
| function which ($command) { | |
| Get-Command -Name $command -ErrorAction SilentlyContinue | | |
| Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue | |
| } | |
| function getip { | |
| (Invoke-WebRequest http://ifconfig.me/ip).Content | |
| } | |
| function ff { | |
| nvim $(fzf --preview 'bat --style=numbers --color=always --line-range :500 {}') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment