From 9753e24b23fe2c1f4c906875c6e5d6c1b280b621 Mon Sep 17 00:00:00 2001 From: Simon Hartcher <simon@simonhartcher.com> Date: Mon, 20 Apr 2015 15:11:29 +1000 Subject: [PATCH] Add Powershell fuck command to README Allows usage of fuck command in Windows Powershell --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d073cedc..c4a22dc5 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,18 @@ function fuck end ``` +Or in your Powershell `$PROFILE` on Windows: + +```powershell +function fuck { + $fuck = $(thefuck (get-history -count 1).commandline) + if($fuck.startswith("echo")) { + $fuck.substring(5) + } + else { iex "$fuck" } +} +``` + Changes will available only in a new shell session.