nvbn / thefuck

Magnificent app which corrects your previous console command.
MIT License
84.92k stars 3.43k forks source link

I can't run thefuck on powershell #1423

Open Alptekinn opened 10 months ago

Alptekinn commented 10 months ago

I can't run thefuck on windows 10. I installed it this way pip install thefuck and I try to iex "$(thefuck --alias)" Error like this

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:8

  • iex "$(thefuck --alias)"
    • CategoryInfo : ObjectNotFound: (thefuck:String) [], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException I also tried it with in my path

iex "$(C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\thefuck --alias)"

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
handsomepwy commented 8 months ago

I am not sure, but I guess the full path attempt location is not correct, the .exe file shall be located under the "Scripts" folder of the installation folder of Python, which is the same level with pip.exe. I am using win10 also.