1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00
Commit Graph

1612 Commits

Author SHA1 Message Date
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 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
Vladimir Iakovlev
60073bea78
N/A: Remove deprecated python 3.4 support + fix tests in 2.7 (#1025)
* N/A: Remove deprecated python 3.4 support

More details - https://www.python.org/downloads/release/python-3410/

* N/A: Remove Python 3.4 from appveyor config

* N/A: Fix UnicodeDecodeError with Python 2.7 and newer versions of py.test
2019-12-16 21:55:19 +01: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
Simon Chan
9381cfefa5 fix: incorrect powershell alias instruction (#1004)
* fix: incorrect powershell alias instruction

* fix: use dot operator to reload powershell profile
2019-11-02 19:06:17 +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
ecee70f774 #N/A: Use Xenial on TravisCI (#989)
This simplifies and reduces the size of `.travis.yml`.
2019-11-02 19:03:35 +01:00
Shawn McGraw
70b414aca2 Issue#965 - added venv instructions to CONTRIBUTING.md (#976)
* Issue#965 - added venv instructions to CONTRIBUTING.md

* Added link to official docs for venv [issue965]
2019-10-23 00:30:55 +02: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
ik1ne
581a292797 Add support for switch_lang for Korean. (#981)
* switch korean letters to english

* revised according to recent changes

* Fix typo in tests/test_switch_lang.py

* Add a test case for coverage

* Change: Moved decomposing logic which changes command.script to get_new_command instead of match.

* Fix: changed unicode characters to unicode string for python2 compatibility.

* Fix: Modified to change request.

@ik1ne @yangkyeongmo
2019-10-19 15:03:21 +02:00
Eugene Duboviy
7a9d87f502 Add Python 3.8 version support (#983)
* Update .travis.yml

* Update tox.ini
2019-10-19 15:00:52 +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
RetekBacsi
64dd018c1a Slow command timeout didn’t work (#961)
* Slow command timeout didn’t work

+ Fixed debug message to include is_slow
* Using only the first word of shlex.split when checking if command is slow.

* Fixed index error when command is empty
2019-10-08 23:43:19 +02:00
thatneat
3bbd0e9463 Correct "apt uninstall" -> "apt remove" (#950)
* Correct "apt uninstall" -> "apt remove"

* remove unused import
2019-09-17 20:02:45 +02:00
Shaoyuan CHEN
c53676e42f change sudo.py pattern to lowercase (#947) 2019-09-02 19:17:48 +02:00
ik1ne
84c16fb69a Change: rules_git_checkout handling branch names with slashes & Remote HEAD. (#944)
* Add: Test for branch names with slashes & Remote HEAD.

* - Add: Handling for removing remote HEAD.
- Change: Improved handling for branches with slash in their names.
2019-09-02 19:16:40 +02:00
ik1ne
1683f45e94 Update docker commands. (#940)
* Add: Tests for newer version docker support.

* Add: Support for newer versions of docker (Modified rules.docker_not_command).

* Fix: Updated disabling memoize.

* Change: removed empty list check.

* Fix: _parse_commands now uses line.strip() internally and ends_with arg now doesn't end with newline.

* Change: Replaced disable_memoize in favor of no_memoize fixture.

* Fix: removed unused import.
2019-08-21 20:35:55 +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
Samuel Marks
8ef9634492 [.editorconfig] Init (#938) 2019-08-19 21:47:15 +02:00
ik1ne
335ae40675 Fix: rules.git_checkout not working with git 2.22.0 (#934)
* Change: remove period from git checkout error output.

* Change: remove period from git checkout get_new_command.
2019-08-19 21:45:55 +02:00
tobixx
3bbe391391 Only consider raw command in output (#931)
* Only consider raw command in output match

... else it will not work for localized messages.

Example German output:
```
Führen Sie »apt list --upgradable« aus, um sie anzuzeigen.
```

* added german output test

* make the linter happy
2019-08-19 21:39:14 +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
Pablo Aguiar
e047c1eb40 #921: Try printing alias before trying to fix a command (#923)
Fixes #921
2019-06-26 20:01:38 +02:00
Tycho Grouwstra
48e1e4217f support nixos command-not-found, closes #912 (#922) 2019-06-26 20:01:02 +02:00
Vladimir Iakovlev
59dc6cbf90 #N/A: Fix the release script 2019-05-27 18:32:48 +02:00
Vladimir Iakovlev
59e1f7b122 Bump to 3.29 2019-05-27 18:29:04 +02:00
Pablo Aguiar
ff2944086d #N/A: Improve how version is fetched for all shells (#920) 2019-05-27 18:24:55 +02:00
Pablo Aguiar
ba949f7fd9 #N/A: Add pyenv_no_such_command rule (#919) 2019-05-27 18:23:45 +02:00
Pablo Aguiar
5efcf1019f #N/A: Improve support to Windows in no_command rule (#918)
Windows “not found” message is quite different from POSIX systems.
2019-05-27 18:23:06 +02:00
Ryan Delaney
70a13406f0 Fix a couple small shellcheck errors (#915)
* Fix shellcheck SC2046

Further reading: https://github.com/koalaman/shellcheck/wiki/Sc2046

* Fix shellcheck 2068

Further reading: https://github.com/koalaman/shellcheck/wiki/Sc2068

* Fix syntax error from bad quoting

I also used a docstring here because the escaping makes it harder for
humans to parse
2019-05-22 20:22:09 +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
Pablo Aguiar
78ef9eec88 #902: Use os.pathsep to split PATH env var (#917)
Fix #902
2019-05-21 20:47:47 +02:00
Pablo Aguiar
40ab4eb62d #899: Support -y/--yeah command line args in Fish Shell (#900) 2019-04-24 18:17:52 +02:00
Nick "darkfiberiru" Wolff
55cb3546df Pkg should be recommend on freebsd to install (#905) 2019-04-24 18:17:01 +02:00