1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

Merge pull request #696 from MattKotsenas/bugfix/params

Support parameters in PowerShell
This commit is contained in:
Vladimir Iakovlev 2017-09-27 19:09:46 +03:00 committed by GitHub
commit 8fb5ba3931

View File

@ -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' \