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

369 Commits

Author SHA1 Message Date
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
Inga Feick
82902fb50d Add rule for pip_install permission fix (#895)
* Add rule for pip_install permission fix

* Fix whitespace

* Switch quotation to single

* remove 2nd else

* E261 indent comment
2019-04-24 18:15:38 +02:00
Inga Feick
828ae537da Docker login (#894)
* Add docker_login rule

* Add docker_login rule

* Whitespace fix

* Fix typo in test case

* Fix typo in test case

* Add test cases
2019-04-04 00:01:14 +02:00
Aiden Song
1208faaabb #N/A: Add rule for git commit that reverts previous commit (#886) 2019-02-25 23:24:16 +01:00
Fábio Santos
ac343fb1bd #868: Point out you can use linuxbrew in README
* Point out you can use linuxbrew

* Change text and add link to linuxbrew

* Change brew related URLs to HTTPS
2019-01-04 20:35:27 +01:00
Přemek Vyhnal
b08aec02f5 update install guide for Linux Mint (#852)
on Mint I had to install python3-setuptools package too
2018-10-30 21:49:42 +01:00
Pablo Aguiar
25142f81f8 Some improvements (#846)
* #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
2018-10-08 22:32:30 +02:00
Rafał Zawadzki
5fd4f74701 Added back-ticks for the consistency (#845) 2018-10-08 22:20:17 +02:00
James Turnbull
926e9ef963 Added a rule to match az binary sub-command misses (#834) 2018-08-16 00:22:24 +02:00
Scott Colby
1dfd6373ee Stop parsing language-variable cat output to make cat_dir more reliable. (#827)
* Stop parsing language-variable cat output to make cat_dir more reliable.

* Add missing semicolon in readme
2018-07-11 23:47:06 +02:00
Scott Colby
fe0785bc42 Create cat_dir rule for replacing cat with ls (#823)
* 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.
2018-07-10 00:51:42 +02:00
Glen Yu
142ef6e66c added --yeah as an alterative arg to -y and --yes; updated README.md (#822) 2018-07-10 00:50:11 +02:00
Mas0s
59745942b5 added notice to README.md (#821)
zsh's autocorrect function interferes with thefuck, that is now mentioned in README
2018-07-10 00:49:20 +02:00
Iulian Onofrei
89207d6d7c Add brew_reinstall rule (#816)
Replaces install with reinstall when a package is already installed.
2018-05-22 19:25:05 +02:00
Vladimir Iakovlev
81042514c8 Squashed commit of the following:
commit 6919161e77a39b9bd59ca54eac44b956cd3ae1dc
Author: Vladimir Iakovlev <nvbn.rm@gmail.com>
Date:   Tue May 22 19:01:33 2018 +0200

    #810: Fix code style

commit ebbb31a3227ce32ba5288e96c0c16a3d334c45d6
Merge: 2df1a5a a2799ad
Author: Vladimir Iakovlev <nvbn.rm@gmail.com>
Date:   Tue May 22 18:59:56 2018 +0200

    Merge branch 'feature/long-form-help' of https://github.com/jakewarren/thefuck into jakewarren-feature/long-form-help

commit a2799ad098
Author: Jake Warren <jakewarren@users.noreply.github.com>
Date:   Mon May 7 14:12:57 2018 -0500

    Add new `long_form_help` rule
2018-05-22 19:01:51 +02:00
Iulian Onofrei
68949a5922 Fix spelling (#814) 2018-05-13 15:28:39 +02:00
Evan Pratten
97f2d743b3 Update README.md 2018-05-11 11:36:24 +02:00
Adam B
33a87502cd Update README.md for clarity and concision (#794)
Reworded several sentences and paragraphs for clarity and concision. All original information was maintained.
2018-04-01 16:25:09 -04:00
JunYoung Gwak
dd9554539f Added a rule to delete sudo for pacaur. (#787) 2018-02-22 22:14:02 +01:00
Joseph Frazier
027b41da59
Add git_merge_unrelated rule for git merge --allow-unrelated-histories (#773)
From https://git-scm.com/docs/merge-options#merge-options---allow-unrelated-histories

> By default, `git merge` command refuses to merge histories that do not
share a common ancestor. This option can be used to override this safety
when merging histories of two projects that started their lives
independently.
2018-01-16 20:03:56 -05:00
Guangyuan (Charlie) Yang
aa45585601 Add installation instructions on FreeBSD (#770)
misc/thefuck has recently been committed to the FreeBSD ports tree (https://svnweb.freebsd.org/ports?view=revision&revision=458123).
2018-01-10 21:31:38 +01:00
David Hart
797ca1c564 Offer git commit --amend after previous git commit (#764) 2018-01-05 16:24:43 -05:00
David Hart
7b10a86267 Add rule for ADB unknown commands (#765) 2018-01-05 16:20:03 -05:00
Joseph Frazier
a696461cd3 Add apt_upgrade rule (#761)
* apt_list_upgradable: Prepend sudo to suggestion if used in command

* Add apt_upgrade rule

This suggests `apt upgrade` after `apt list --upgradable` if there are
packages to upgrade. It pairs well with the `apt_list_upgradable` rule,
which suggests `apt list --upgradable` after `apt update` if there are
packages to upgrade.

* Add apt_upgrade rule to README
2018-01-03 19:01:09 +01:00
Joseph Frazier
7e6d1dbc7c Move Developing instructions from README to CONTRIBUTING (#757)
* Move Developing instructions from README to CONTRIBUTING

This makes them easier to find, especially for users opening issues or
pull requests. See here for more details:
https://help.github.com/articles/setting-guidelines-for-repository-contributors/

* fixup! Move Developing instructions from README to CONTRIBUTING
2018-01-03 19:00:20 +01:00
David Hart
f700b23f57 Add git merge rule (#755)
This fixes https://github.com/nvbn/thefuck/issues/629
2018-01-02 11:47:48 -05:00
Joseph Frazier
897572d278
README: Use pip3 in upgrade command (#756)
Fixes https://github.com/nvbn/thefuck/issues/615
2018-01-02 10:14:11 -05:00
Joseph Frazier
0640509895
Drop Python 3.3 Support (#747)
* Drop Python 3.3 Support

It's reached end-of-life, and our dependencies have started to drop it.
See https://github.com/nvbn/thefuck/pull/744#issuecomment-353244371

* Revert "Use pytest<3.3 to fix Python 3.3 tests (#746)"

This reverts commit f966ecd4f5.
2018-01-01 20:18:05 -05:00
Vladimir Iakovlev
4847078f37 #737: Add support of third-party rules 2017-11-23 20:21:44 +01:00
Joseph Frazier
d582159670 Add apt_list_upgradable rule (#732)
This helps you run `apt list --upgradable` after `apt update`,
as it suggests.
2017-11-16 20:19:44 +01:00
Joseph Frazier
10ac1a3b38
#728: Add heroku_multiple_apps rule (#729)
Closes https://github.com/nvbn/thefuck/issues/728
2017-11-09 18:42:23 -05:00
Stef Pletinck
64d6835e15 #652: Add new git_push_different_branch_names rule
Fix #652

* Basic fix for #652
* Finishing work
* Added readme line
* Added test
* My test was stupid...
* Removed redundant lines
* That space...
2017-10-15 13:30:29 -02:00
Vladimir Iakovlev
985b2d9ec9 #N/A: Add brew_cask_dependency rule 2017-10-15 16:11:08 +02:00