Powershell, The term 'thefuck' is not recognized as the name of a cmdlet

See original GitHub issue

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0):

The Fuck 3.26 using Python 3.6.5

Your shell and its version (bash, zsh, Windows PowerShell, etc.):

Windows Powershell, 5.1.16299.251

Your system (Debian 7, ArchLinux, Windows, etc.):

Windows 10

How to reproduce the bug:

- install thefuck
`py -m pip install thefuck`
- put the alias into your powershell profile
```
$env:PYTHONIOENCODING="utf-8"
iex "$(thefuck --alias)"
```
- start a new powershell

Result:

thefuck : The term 'thefuck' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

Hmm I can’t manage to output this.

Anything else you think is relevant:

I also tried it with the following in my profile:

...
iex "$(C:\Users\MyUserName\AppData\Local\Programs\Python\Python36-32\Scripts\thefuck.exe --alias)"

Then I get a similar error after executing fuck:

thefuck : The term 'thefuck' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:141
+ ... g]::IsNullOrWhiteSpace($history)) {         $fuck = $(thefuck $args $ ...
+                                                           ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (thefuck:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
grafstcommented, Sep 3, 2021

i had to reinstall thefuck from administrator prompt. Now it works.

1reaction
michaelpalumbocommented, Feb 1, 2020
Powershell, The term 'thefuck' is not recognized as the name of a cmdlet

I mean, I came across this in a somewhat unrelated google search and it made me laugh loudly at work. But I have to say, this utility is a nice idea 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Import-StartLayout is not the name of cmdlet....
Im trying to import a layout to Windows 10 via powershell. The command in the .ps1 script (which also does other things like...
Read more >
I'm basically a PowerShell God now : r/ProgrammerHumor
"The term Get-ADGroupMember is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the ......
Read more >
Windows Powershell | Explore Tumblr Posts and Blogs - Tumpik
the term 'you' is not recognized as the name of a cmdlet, function, script file, or operable program. #mine#techcore#unreality#windows powershell sure is a ......
Read more >
thefuck - PyPI
apt-get install vim E: Could not open lock file /var/lib/dpkg/lock - open ... or comment thefuck alias line from your Bash, Zsh, Fish,...
Read more >
Why are Powershell commands in windows so tough? - Quora
You can work backwards and figure out that it's "print working directory", ... in history was written by a team of people whose...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found