nvbn / thefuck

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

Add nushell support #1442

Open afresquet opened 2 months ago

afresquet commented 2 months ago

Fixes #1441 #1254

The real issue wasn't the missing Nushell class, but rather sys.stdout.write failing to make nushell run the command.

I've fixed that by running a subprocess, however it lacks access to any config/env that is set in the current session, it could be fixed by adding an -l flag to the command, but that will also run anything that run on login (like neofetch).

Still, also added a Nushell class with the relevant overrides.

What do you think @nvbn ? Anything that could be changed let me know, it's my first time writing Python so I'm sure there are things that could be done better

afresquet commented 2 months ago

CC @scorphus

Hopefully it's okay to ping you as I see you've made the last release :)

acvcleitao commented 1 month ago

Just tested it on my machine. Nice work!