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.
* 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
* 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>
* 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
* 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
* 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
* 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.
* 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.
* - 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.
* 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
* 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
* #N/A: Ignore W504 line break after binary operator
W504 is now part of flake8 current version 3.6
* #N/A: Fix invalid escape sequences
* #N/A: Remove conflicting path before installing gcc with brew
* #833: do not require sudo on TravisCI
* #N/A: Add Python dev releases to TravisCI pipeline
Inspired by Brett Cannon's advise [1].
1: https://snarky.ca/how-to-use-your-project-travis-to-help-test-python-itself/
* #837: try and kill proc and its children
* #N/A: show shell information on `thefuck --version`
* #N/A: omit default arguments to get_close_matches
* #842: add settings var to control number of close matches
* #N/A: remove `n` from the list of `get_closest`'s args
On a Mac, also on NetBSD or OpenBSD, `touch` errs differently:
```
$ uname; touch a/b/c
Darwin
touch: a/b/c: No such file or directory
```
That gets matched by the rule but not fixed by it. Thus the regex
pattern is now a bit more tolerant.
* Create `cat_dir` rule for replacing `cat` with `ls` when you try to run `cat` on a directory.
* Changed to string methods in response to feedback.
Added a test to make sure lines like 'cat cat' don't become 'ls ls'.
Added trailing '\n's to test cases.