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.
This commit is contained in:
committed by
Vladimir Iakovlev
parent
142ef6e66c
commit
fe0785bc42
@@ -177,6 +177,7 @@ following rules are enabled by default:
|
||||
* `aws_cli` – fixes misspelled commands like `aws dynamdb scan`;
|
||||
* `cargo` – runs `cargo build` instead of `cargo`;
|
||||
* `cargo_no_command` – fixes wrongs commands like `cargo buid`;
|
||||
* `cat_dir` – replaces `cat` with `ls` when you try to `cat` a directory
|
||||
* `cd_correction` – spellchecks and correct failed cd commands;
|
||||
* `cd_mkdir` – creates directories before cd'ing into them;
|
||||
* `cd_parent` – changes `cd..` to `cd ..`;
|
||||
|
||||
Reference in New Issue
Block a user