1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 02:01:13 +00:00

Add a cargo rule

This commit is contained in:
mcarton 2015-06-06 16:56:28 +02:00
parent 3d41a3fb7c
commit 01cf199866
2 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,7 @@ sudo pip install thefuck --upgrade
The Fuck tries to match a rule for the previous command, creates a new command
using the matched rule and runs it. Rules enabled by default are as follows:
* `cargo` – run `cargo build` instead of `cargo`;
* `cd_correction` – spellchecks and correct failed cd commands;
* `cd_mkdir` – creates directories before cd'ing into them;
* `cd_parent` – changes `cd..` to `cd ..`;

6
thefuck/rules/cargo.py Normal file
View File

@ -0,0 +1,6 @@
def match(command, settings):
return command.script == 'cargo'
def get_new_command(command, settings):
return 'cargo build'