Something went wrong. Try again.
config for my powershell
Something went wrong. Try again.
Power.shell Microsoft.PowerShell_profile.ps1
2.2 kB · 145 lines
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146# --- flages --- #Clear-Host
# --- source --- #. ~/.config/powershell/colours.ps1
# --- imports --- #Invoke-Expression (&starship init powershell)
# --- PATHS --- #$env:PATH += ":$HOME/.local/bin"$env:PATH += ":$HOME/.opencode/bin"$env:PATH += ":$HOME/.cargo/bin"$env:PATH += ":/home/jadu/codespace/my-lang/nixi/src"
# --- tools --- # $env:EDITOR="nvim"$env:PAGER="less"$env:TERM="xterm-256color"
# zoxideRemove-Item Alias:cd -ErrorAction SilentlyContinueInvoke-Expression (& { (zoxide init powershell | Out-String) })
# --- BASIC --- #function source{ . $PROFILE}function cd{ if ($args.Count -gt 0) { z "$($args -join ' ')" } else { z }}function ..{ z .. }
function x{ Clear-Host }function v{ nvim $args }function y{ yazi }function mk{ mkdir $args }function t{ New-Item $args -ItemType File }function ch{ chmod +x $args }function th{ thunar . }function cm{ cmatrix }function :q{ exit }
# --- EZA ---function ls{ eza --icons $args }function ll{ eza --icons --long $args }function l{ eza --icons --long $args }function lt{ eza --icons --tree $args }
# --- FILES ---function tar{ tar -xvf $args }function un{ unzip $args }function open{ xdg-open $args }
# --- GIT ---Remove-Item Alias:gi -ErrorAction SilentlyContinueRemove-Item Alias:gc -ErrorAction SilentlyContinueRemove-Item Alias:gp -ErrorAction SilentlyContinuefunction ga{ git add @args}function gm{ git commit -m @args }function gp{ git push }function gs{ git status }
# --- SYSTEM ---function fa{ fastfetch --logo Arch }function install{ sudo pacman -S $args }function remove{ sudo pacman -Rs $args }
# --- MISC ---function code{ opencode }
# --- PSReadLine (Linux-safe, zsh-like) ---Import-Module PSReadLine
Set-PSReadLineOption -EditMode EmacsSet-PSReadLineOption -PredictionSource HistorySet-PSReadLineOption -PredictionViewStyle InlineViewSet-PSReadLineOption -Colors @{ Command = $ctp.blue Parameter = $ctp.teal String = $ctp.green Operator = $ctp.pink Variable = $ctp.mauve Number = $ctp.peach InlinePrediction = $ctp.overlay0}