summaryrefslogtreecommitdiff
path: root/dot_config
diff options
context:
space:
mode:
authorIbrahim Muftee <ibrahim@muftee.net>2024-06-19 14:42:39 -0500
committerIbrahim Muftee <ibrahim@muftee.net>2026-07-01 00:23:31 -0400
commitff6b35411a0dfdfd0b367f85d81d24531bfe9446 (patch)
tree0e26c0f32a765d665453f940f413a5a269186518 /dot_config
parenta909a0520b555be12db6db17739cc12e9de6fbd7 (diff)
feat(powershell): add some aliases
Diffstat (limited to 'dot_config')
-rw-r--r--dot_config/powershell/Microsoft.PowerShell_profile.ps19
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)