diff options
| -rw-r--r-- | dot_config/powershell/Microsoft.PowerShell_profile.ps1 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dot_config/powershell/Microsoft.PowerShell_profile.ps1 b/dot_config/powershell/Microsoft.PowerShell_profile.ps1 index 86e788e..6a006de 100644 --- a/dot_config/powershell/Microsoft.PowerShell_profile.ps1 +++ b/dot_config/powershell/Microsoft.PowerShell_profile.ps1 @@ -23,5 +23,14 @@ Set-PSReadlineKeyHandler -Key "Ctrl+f" -ScriptBlock { [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") } +# Aliases +if (Get-Command -Name 'nvim' -CommandType 'Application' -ErrorAction SilentlyContinue) { + if (Get-Command -Name 'poetry' -CommandType 'Application' -ErrorAction SilentlyContinue) { + # Can't create an "alias" with CLI args + function pn() { & poetry run nvim . } + function prun() { & poetry run } + } +} + # Load Starship prompt Invoke-Expression (&starship init powershell) |
