1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 20:11:17 +00:00

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.
This commit is contained in:
Tolunay Dündar 2025-01-16 19:44:17 +03:00 committed by GitHub
parent 9b97187e13
commit 09c9504181
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
```
---
<a href='#manual-installation' name='manual-installation'>#</a>
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