From e6496ce8bbef0f2fbeea94f0d0cb3e44634a5e33 Mon Sep 17 00:00:00 2001 From: Matt Kotsenas Date: Tue, 26 Sep 2017 15:57:13 -0700 Subject: [PATCH] Support parameters in PowerShell Update the PowerShell alias so it passes thefuck parameters (e.g. `-y` or `-r`). --- thefuck/shells/powershell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/shells/powershell.py b/thefuck/shells/powershell.py index 17477805..e08e1eac 100644 --- a/thefuck/shells/powershell.py +++ b/thefuck/shells/powershell.py @@ -6,7 +6,7 @@ class Powershell(Generic): return 'function ' + alias_name + ' {\n' \ ' $history = (Get-History -Count 1).CommandLine;\n' \ ' if (-not [string]::IsNullOrWhiteSpace($history)) {\n' \ - ' $fuck = $(thefuck $history);\n' \ + ' $fuck = $(thefuck $args $history);\n' \ ' if (-not [string]::IsNullOrWhiteSpace($fuck)) {\n' \ ' if ($fuck.StartsWith("echo")) { $fuck = $fuck.Substring(5); }\n' \ ' else { iex "$fuck"; }\n' \