1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 14:48:49 +00:00

401 Commits

Author SHA1 Message Date
Tolunay Dündar
09c9504181
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.
2025-01-16 19:44:17 +03:00
Tolunay Dündar
9b97187e13
Add an alternative installation command for Windows
Using "pip install thefuck" on Windows works, but the app itself does not.

Using "fuck" command on PowerShell/Terminal results with "ModuleNotFoundError: No module named 'imp'".

This alternative installation method fixes that error.
See: https://github.com/nvbn/thefuck/issues/1434#issuecomment-2108618450

Thanks to @danthe1st
2025-01-16 19:21:35 +03:00
Alan Gabbianelli
c7e7e1d884 Fix typos in README.md 2024-01-25 20:52:35 +01:00
Hugo van Kemenade
51b82c5377 Update min Python 3 version required in README 2023-07-09 13:03:32 +02:00
Hugo van Kemenade
5f562a185c Drop the dot https://twitter.com/pytestdotorg/status/753767547866972160 2023-07-09 13:03:27 +02:00
josepdaniel
ceeaeab94b
Add terraform 'no command' rule (#1317)
* Add terraform 'no command' rule

* Feedback from PR

Co-authored-by: Joseph Daniel <jdn@logpoint.com>
2022-09-25 21:37:47 +02:00
Dan
56c16b737f
Added Arch based installation (#1319)
Co-authored-by: Dan <dan@arch.localdomain>
2022-08-31 20:42:41 +02:00
Miguel Guthridge
f9768cf929
#1302: Add new git_clone_missing rule
* Add git clone missing rule

* Clean up tests and improve matching

* Make rules behave correctly?

* Improve tests and redo matcher

* Remove unnecessary tests

* Improvements as per code review

* Remove dead tests

* Improve match function for git clone missing

* Improve tests

* Fix more tests

* Fix failing test

* Add Macos's /bin/sh command output to match

* Add output for lines uncovered by tests

Co-authored-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
2022-07-03 13:22:36 +02:00
Tagada
d8ddf5a2be
#1279: Add pikaur AUR manager to Arch Linux's commands
* Add pikaur AUR manager to Arch Linux's commands

* Update README.md

* Update test_pacman_not_found.py

* Update pacman_not_found.py

* Update README.md

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2022-03-27 22:06:40 +02:00
Benjamin Rood
c719712b62 Use --user with pip, not sudo pip
`sudo` with `pip` is [considered unsafe](https://stackoverflow.com/a/22517157/2469559).

Instead, run such commands with the `--user` argument to get the same result _safely._
2021-09-05 16:58:35 +02:00
Yotam Salmon
2a166a7dec
#977: Add wrong_hyphen_before_subcommand rule
Co-authored-by: user <avi.salmon@intel.com>
Co-authored-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
2021-08-07 23:26:36 +02:00
Lars Alexander Blumberg
8fa10b1049
#868: Fix outdated link to homebrew for Linux (#1226) 2021-08-07 13:12:12 +02:00
Dave Storey
70a42b54ab #1184: Add new rule for main / master Git branches 2021-04-06 14:50:43 +01:00
Pablo Santiago Blum de Aguiar
11b70526f7 #1131: Improve git_commit_add rule
Add more capabilities to the rule, remove its priority and fix tests
2021-07-08 21:43:35 +02:00
Sergei Haller
55922e4dbe #1131: Add rule for Git commit with no added files 2020-09-08 11:47:05 +02:00
Pablo Santiago Blum de Aguiar
799f4127ca #942: Improve git_branch_0flag rule - with a new name 2021-07-13 15:36:11 +02:00
Abraham Chan
6111523034
#1210: Add rule 'rails_migrations_pending'
* Add rule 'rails_migrations_pending'

* Update thefuck/rules/rails_migrations_pending.py

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

* Add initial command to corrected command

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-07-06 12:52:54 +02:00
ProfessorTom
24576b30b2
#942: Add new git_branch_0v_to_dash_v rule
* fix fuckup `branch 0v` by...

...deleting branch `0v` and running `git branch -v` as the user intended

* use quotes consistently

* provide new  solution implementation based on feedback on PR

* rename files to more accurately reflect their more generic contents

* update import statement to match new file name

* update command name in README.md

* separate out matching tests so the pattern is clear for those who add matches in the future
2021-07-01 23:07:38 +02:00
T.J. Kolberg
373f445e9b
#1150: Update the name of macOS on README
* Update README.md

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-07-01 11:47:12 +02:00
Romain Heller
7f97818663
#455: [README] Add uninstall instructions (#1171)
* ~[Doc] Add Uninstall instructions

As we need the package and to modify the shell config, users could have a pain in the ass when it comes to retire *The Fuck* from the system.

* Update README.md

* Update README.md

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-06-30 14:20:48 +02:00
Elisha Hollander
06e14afd17
#N/A: Fix grammar and spelling errors (#1193)
* Fix grammar and spelling errors

* Update README.md

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-06-29 21:25:01 +02:00
Stuart Leeks
6da0bc557f
Add excluded_search_path_prefixes setting (#1165)
Improves performance in WSL

Fix #1036

* Add excluded_search_path_prefixes setting

Allows filtering the paths used to search for commands
Can be useful to filter out /mnt/ in WSL for performance

* Add test for excluded_search_path_prefixes

* Apply suggestions from code review

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-04-21 19:43:21 +02:00
Sid Shardanand
4c7479b3ad
#N/A: Add cd_cs rule (#1167)
* adding in files for the cd-cs feature

* Updated thefuck/rules/cd_cs.py comments to be more verbose

Thanks Scorphus!

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

* Updating the rules file to exclude the \xe2 character

This character(–) has lead to the commit failing some of the tests. 
I am removing it from the code and we should see the tests pass now.

* Setting the encoding in thefuck/rules/cd_cs.py

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

Co-authored-by: SID SHARDANAND <sshardan@deakin.edu.au>
Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-03-22 20:55:45 +01:00
Divy Jain
5b612add74
#1154: Fix badges in README (#1175) 2021-03-13 14:24:53 +01:00
Pablo Santiago Blum de Aguiar
b9dd54c768 #1174: Fix anchor references 2021-03-13 12:50:09 +01:00
Bhavishya Pandit
7af9f41d93
#N/A: Add a Contents section to README (#1174)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-03-13 00:58:10 +01:00
Georgios Kontosis
0e34c2343e
#/N/A: Extend pyenv rule to include goenv, nodenv and rbenv (#1100)
Co-authored-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
Co-authored-by: Divy Jain <dkj@somaiya.edu>
2021-02-11 12:48:20 +01:00
Connor Martin
fd90e69ceb
#N/A: Add conda rule (#1138)
* add conda rules

* revert

* add conda

* add to readme and flake

* consistency with quotes and use for_app

* Update thefuck/rules/conda_mistype.py

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2021-02-08 13:04:59 +01:00
Divy Jain
0c58317932
#N/A: Migrate CI pipeline to Github Actions (#1154)
Co-authored-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
2021-01-21 14:34:01 +01:00
Divy Jain
62dddd5821
#1149: Add python_module_error rule (#1151) 2021-01-19 22:37:05 +01:00
Nyanotech
639e9bda7a
Add rule to remove a doubled-up "git clone" in a git clone command. (#1106)
Some git hosts will copy the entire clone command, while others just
copy the url, so typing "git clone ", then pasting a git url that
already has a "git clone " on the front is a somewhat common issue.
2020-07-16 23:34:22 +02:00
Divya Jain
39753a004e
#1096: Rule: Bypass failed git hook (#1097)
* naive implementation

* better implementation

* remove redundant enabled_by_default

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>

* add README entry

* add tests

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2020-07-16 23:32:29 +02:00
Connor Martin
f82176802e
add git-lfs support (#1056)
* add mistyping support for git lfs

* add the rule

* fix flake8

* flake8

* add to readme

* use fixtures and regex

* get rid of additional matched strings
2020-06-11 00:20:37 +02:00
DragonGhost7
3c542a5b8c
Added pacman invalid option rule (#960)
* Added pacman invalid option rule

* Added test

* flake8 fixes

* Test changes

* Test fix

* Typo - again

* Travis test fix

* More Travis

* Even more travis

* I hope im right here

* Update README.md

Co-Authored-By: Pablo Aguiar <scorphus@gmail.com>

* Update thefuck/rules/pacman_invalid_option.py

Co-Authored-By: Pablo Aguiar <scorphus@gmail.com>

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2020-03-28 23:15:20 +01:00
Caplinja
88db57b4b1 #N/A: Add a new rule to create directory on cp or mv 2020-03-01 13:04:53 -06:00
Philip Arola
d10fc80fa5 Add choco_install rule (#998)
* Add choco_install rule

Adds a rule to append '.install' to a chocolatey install command that
failed because of a non-existent package.

TODO: add support for other suffixes (.portable), find more parameter
cases

* Apply suggestions from code review

Circling back to retest

Co-Authored-By: Pablo Aguiar <scorphus@gmail.com>

* Fixed errors from suggested changes

* Added more test cases, refactored parsing

* Reformat keyword detection if statement

* Fixed flake errors

* Added tests for match
2019-11-07 01:10:00 +01:00
boonwj
fdea32b47d Fix typos in README.md (#997)
* Fix typos in README.md

* Fix another typo

- lifecycle to life cycle
2019-11-02 19:07:32 +01:00
boonwj
793510ad48 Add rule to remove leading shell prompt literal $ (#996)
* Add rule to remove shell prompt literals $

Rule added to handle cases where the $ symbol is used in the command,
this usually happens when the command is copy pasted from a
documentation that includes the shell prompt symbol in the code blocks.

* Change files using black and flake8 style check

* Refactor tests and rule

- Refactor test for cleaner test tables
- Removed unnecessary requires_output=True option
2019-11-02 19:04:47 +01:00
Pablo Aguiar
d85099b8da #N/A: Inform the correct path to DEFAULT_RULES (#993) 2019-11-02 19:03:58 +01:00
Pablo Aguiar
80cfd6991d #N/A: Add new git_branch_delete_checked_out rule (#985) 2019-10-23 00:30:17 +02:00
ik1ne
0ccb34bde8 Support for yum invalid commands. (#968)
* - Add skeleton code for yum_invalid_operation.py
- Add test for rule/yum_invalid_operation

* Add: mocker for subprocess.Popen.

* Fix: invalid yum_operations.

* Fix: Added missing fixtures.

* Add: yum_invalid_operation implementation.

* Add: enabled_by_default variable for rules/yum_invalid_operation.

* Update Readme.
2019-10-19 15:05:22 +02:00
Eli Schiff
4f165bf6df removed extra whitespace (#967) 2019-10-08 23:47:04 +02:00
Fabian van Dijk
6789701e23 Add fuck --hard as alternative to fuck --yeah (#963)
* Add fuck --hard as alternative to fuck --yeah

* Fix missing comma in thefuck/argument_parser.py

Co-Authored-By: lomckee <cstutoringluke@gmail.com>

* Update README on fuck --hard
2019-10-08 23:44:22 +02:00
ik1ne
d88454a638 Add: rules/go_unknown_command for misspelled go commands. (#933)
* - Add: rules/go_unknown_command for misspelled go commands.
- Add: tests/test_go_unknown_command which tests match and mismatch case of rules/go_unknown_command.
- Change: Added description of go_unknown_command to README.md.

* Add: test_get_new_command for testing rules.go_unknown_command.test_get_new_command method.

* Change: go_unknown_command.match now uses for_app decorator.

* Add: get_golang_commands which dynamically gets golang possible commands.

* Fix: cache proper function instead of its result.
2019-08-21 20:34:34 +02:00
Connor Martin
01a5ba99d0 Docker remove container before remove image (#928)
* add docker container removal

* remove container before deleting image

* update readme

* clean up and add assert not test

* test not docker command

* use shell.and_ correctly
2019-07-10 20:34:20 +02:00
Mathieu Cantin
4c3a559124 Added rules to run terraform init before terraform plan or apply (#924)
* Run terraform init to initialize terraform modules

* Fix indent

* Add unit tests for terraform_init.py
2019-06-26 20:02:01 +02:00
Tycho Grouwstra
48e1e4217f support nixos command-not-found, closes #912 (#922) 2019-06-26 20:01:02 +02:00
Pablo Aguiar
ba949f7fd9 #N/A: Add pyenv_no_such_command rule (#919) 2019-05-27 18:23:45 +02:00
Jesus Cuesta
201c01fc74 Adding yay AUR manager to Arch Linux's commands since yaourt is unmaintained and has some security issues. (#907) 2019-05-21 20:49:04 +02:00
Nick "darkfiberiru" Wolff
55cb3546df Pkg should be recommend on freebsd to install (#905) 2019-04-24 18:17:01 +02:00