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

387 Commits

Author SHA1 Message Date
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
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