From 09c9504181feeb7e5d974056e2c3ebcfe754bfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tolunay=20D=C3=BCndar?= <67644521+tolunaydundar@users.noreply.github.com> Date: Thu, 16 Jan 2025 19:44:17 +0300 Subject: [PATCH] Add PowerShell Set-ExecutionPolicy command to installation section It is, as default, forbidden by PowerShell to run remotely signed apps to be run. This results with The Fuck failing to run. In order to run The Fuck on PowerShell, the default ExecutionPolicy needs to be changed. --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ff611a49..d5fb8391 100644 --- a/README.md +++ b/README.md @@ -153,9 +153,17 @@ On Windows, if you encounter the error "ModuleNotFoundError: No module named 'im pip uninstall thefuck pip install https://github.com/nvbn/thefuck/archive/master.zip ``` - [Alternatively, you may use an OS package manager (OS X, Ubuntu, Arch).](https://github.com/nvbn/thefuck/wiki/Installation) +--- + +**Note for Windows users:** Also, on Windows, in order to run the command *fuck* on PowerShell/Terminal, you need to change the default ExecutionPolicy after running the PowerShell/Terminal as administrator as PowerShell does not allow remotely signed apps to be run by default (See [PowerShell Execution Policies](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4)): +```bash +Set-ExecutionPolicy -ExecutionPolicy RemoteSigned +``` + +--- + # It is recommended that you place this command in your `.bash_profile`, `.bashrc`, `.zshrc` or other startup script: @@ -171,6 +179,8 @@ eval $(thefuck --alias FUCK) Changes are only available in a new shell session. To make changes immediately available, run `source ~/.bashrc` (or your shell config file like `.zshrc`). +--- + To run fixed commands without confirmation, use the `--yeah` option (or just `-y` for short, or `--hard` if you're especially frustrated): ```bash