1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-20 20:09:07 +00:00

Merge pull request #523 from MattKotsenas/refactor/powershell-config

Add semi-colons in powershell alias
This commit is contained in:
Vladimir Iakovlev 2016-06-27 23:15:14 +03:00 committed by GitHub
commit 25343dbfb4

View File

@ -4,10 +4,10 @@ from .generic import Generic
class Powershell(Generic):
def app_alias(self, fuck):
return 'function ' + fuck + ' { \n' \
' $fuck = $(thefuck (Get-History -Count 1).CommandLine)\n' \
' $fuck = $(thefuck (Get-History -Count 1).CommandLine);\n' \
' if (-not [string]::IsNullOrWhiteSpace($fuck)) {\n' \
' if ($fuck.StartsWith("echo")) { $fuck = $fuck.Substring(5) }\n' \
' else { iex "$fuck" }\n' \
' if ($fuck.StartsWith("echo")) { $fuck = $fuck.Substring(5); }\n' \
' else { iex "$fuck"; }\n' \
' }\n' \
'}\n'