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

1599 Commits

Author SHA1 Message Date
ICalhoun
72d6759b26 modified cd_mkdir.py to work with powershell on linux 2021-05-07 16:20:58 -04:00
ICalhoun
e45e772ae6 added tests for chdir.py in test_chdir.py 2021-04-13 15:58:20 -04:00
ICalhoun
28aef57b75 fixed cd_mkdir.py so that it would work in powershell on windows and linux
also modified it and saved it as chdir.py to work for the chdir command on windows and linux as well.
2021-04-13 14:58:59 -04:00
ICalhoun
0192d1f3ef fixed cd_mkdir.py so it works with windows powershell and added a rule for chdir for powershell 2021-04-09 16:14:10 -04:00
Ryan Callahan
559cd8fa8c
Merge pull request #14 from Comp-490-TR-Afternoon-Group-Four/#7-confirm-reboot-env-variable
#7 confirm reboot env variable
2021-04-08 14:00:58 -04:00
ICalhoun
a70e7fa79e added 2 tests to test_ui.py 2021-04-07 16:11:10 -04:00
ICalhoun
ae7d423b7f fixed select_command so there is no error when cancelling the reboot 2021-04-06 17:07:36 -04:00
Ryan Callahan
457983635a
forgot return statements, oops 2021-04-05 21:08:32 -04:00
Ryan Callahan
6da18d0332
make linter even happier 😄 2021-04-05 21:05:56 -04:00
Ryan Callahan
0a87d6aee2
make linter happy 2021-04-05 21:04:20 -04:00
Ryan Callahan
9c08227b03
Merge branch '#7-confirm-reboot' into #7-confirm-reboot-env-variable 2021-04-05 20:57:43 -04:00
Ryan Callahan
277546b771
extract constants to const file, separate logs.confirm_text function, remove confirmation log function, add env variable for double confirms
Moved the constants declared in the fix_command file to the dedicated constants file.

seperated the command_text file into two different functions so that there isn't another check for if its in the double confirm dict

moved double confirm logic from fix_command into select_command in the ui. I think this would make more sense because the underlying program shouldn't really care about confirmations.

making double confirm off by default with a environment variable required to turn it on. This might be helpful if we try to make a pr for this in the main repo.

update readme to reflect this
2021-04-05 20:53:44 -04:00
ICalhoun
746d4f4497 fixed linting 2021-04-05 20:32:49 -04:00
ICalhoun
abd8800a92 made it more extensible by adding a dictionary called double_check_commands that can be easily added to. Also remove selection arrows from prompt when asking for second confirmation 2021-04-05 19:40:29 -04:00
Ryan Callahan
5084ba1973
Revert "added confirmation function in logs.py"
This reverts commit 488a33d1b785dc49895e5af493a3002a040f0af9.

accidental commit to master
2021-04-05 15:20:45 -04:00
ICalhoun
6f99e2ea7f added confirmation function in logs.py and changed fix_command so that it calls the confirmation functin in logs for reboot 2021-04-05 14:44:57 -04:00
ICalhoun
488a33d1b7 added confirmation function in logs.py 2021-04-05 13:20:20 -04:00
Ryan Callahan
488b8ca6ab Add reboot confirmation dialog
This is kinda rough, I think this could be fleshed out more to be easier to add on to and have a clearer output.
2021-04-03 18:27:52 -04: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
Pablo Santiago Blum de Aguiar
c2cc95db88 #1117: Mock Popen in go_unknown_command test
Instead of ignoring it whenever `go` is unavailable
2021-02-22 22:54:45 +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
Divy Jain
40dd65963d
#1141: Fix crash on empty history (#1145) 2020-11-18 10:43:11 +01:00
Kartik Soneji
836f6eeac5
Skip test instead of failing if go executable is not found. (#1117) 2020-11-03 18:30:03 +01:00
Kartik Soneji
b4c75eebe6
Fix pytest warnings (#1116)
* Add custom pytest mark.

* Fix typo usefixture -> usefixtures.
2020-11-03 18:29:28 +01:00
Pablo Aguiar
22efa8f70e
#1113: Do not load excluded rules (#1125) 2020-11-03 18:27:09 +01:00
Pablo Aguiar
9d3bcad229
#1113: Ignore a rule that fails to load (#1124) 2020-11-03 18:26:13 +01:00
Divya Jain
c196e2901c
#509: Fixed correction on windows machine running other shells (#1091)
* Replaced print with sys.stdout.write

* Fixed tests

* Normalized line endings
2020-07-16 23:56:58 +02:00
Aditi Gupta
ca46956e20
#1066 - Fix rule for brew cask (#1111)
* #1066: Add cask to list of fallback commands

* #1066: Fix homebrew paths
2020-07-16 23:34:41 +02: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
Divya Jain
365db1ee41
#N/A: Refactor for better readability (#1094)
* #N/A: Refactor for better readability

* Change typename for test tuple

* Rename variable
2020-06-14 16:20:40 +02:00
Divya Jain
81b39defe4
#N/A: Fix formatting (#1092)
* Fixed corrector.py format string

* Fixed types.py format string

* Fixed tests/rules/test_fix_file.py formatting

* Removed trailing whitespace

* Fixed UnicodeEncodeError in python 2.7
2020-06-11 00:21:45 +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
Pablo Aguiar
6975d30818
#960: Improve pacman_invalid_option rule (#1072)
The rule now matches all possible lower case options and only those, not
failing for those that cannot be fixed.
2020-04-06 21:46:40 +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
Vladimir Iakovlev
d3a05426de Bump to 3.30 3.30 2020-03-19 18:21:12 +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
Caplinja
444908ce1c #1047: Fix pip_unknown_command by using a less restrictive regex
Fix #1047
2020-03-01 10:40:49 -06:00
David Hart
2ced7a7f33 Allow multiple returns from git_checkout (#1022)
* Allow multiple returns from git_checkout

* Remove multiple returns
2020-01-13 23:28:20 +01:00
David Hart
b28ece0f34 Apt-get help is now much more like apt (#1031)
* Apt-get help is now much more like apt

* Fix tests

* Really fix the tests
2020-01-05 23:53:09 +01:00
Vladimir Iakovlev
eb60900330
#N/A: Unlink python 2 on travis-ci osx build (#1032) 2020-01-05 23:51:19 +01:00
donniebreve
ed8aaa7f26 fixed grammar on how to configure message (#1029) 2019-12-23 17:57:42 +01:00
Tim Gates
77992029b6 Fix simple typo: controle -> control (#1017) 2019-12-16 22:10:45 +01:00
Eli Schiff
25c858c13e removed useless redefined of path variable (#1023) 2019-12-16 21:56:12 +01:00