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:
parent
3d41a3fb7c
commit
01cf199866
@ -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
6
thefuck/rules/cargo.py
Normal file
@ -0,0 +1,6 @@
|
||||
def match(command, settings):
|
||||
return command.script == 'cargo'
|
||||
|
||||
|
||||
def get_new_command(command, settings):
|
||||
return 'cargo build'
|
Loading…
x
Reference in New Issue
Block a user