-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cli-ptb] Add "did you mean" for misspelled commands
- Loading branch information
Showing
5 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--move-cal | ||
--assing | ||
--assig | ||
--splitcoins | ||
--move-vec | ||
--transfer-object |
72 changes: 72 additions & 0 deletions
72
crates/sui/tests/snapshots/ptb_files_tests__invalid_commands.ptb.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
source: crates/sui/tests/ptb_files_tests.rs | ||
expression: "results.join(\"\\n\")" | ||
--- | ||
=== ERRORS AFTER PARSING INPUT COMMANDS === | ||
× Error when processing PTB | ||
╭─[1:1] | ||
1 │ --move-cal | ||
· ─────┬──── | ||
· ╰── Unknown command '--move-cal' | ||
2 │ --assing | ||
╰──── | ||
help: Did you mean '--move-call'? | ||
|
||
× Error when processing PTB | ||
╭─[2:1] | ||
1 │ --move-cal | ||
2 │ --assing | ||
· ────┬─── | ||
· ╰── Unknown command '--assing' | ||
3 │ --assig | ||
╰──── | ||
help: Did you mean '--assign'? | ||
|
||
× Error when processing PTB | ||
╭─[3:1] | ||
2 │ --assing | ||
3 │ --assig | ||
· ───┬─── | ||
· ╰── Unknown command '--assig' | ||
4 │ --splitcoins | ||
╰──── | ||
help: Did you mean '--assign'? | ||
|
||
× Error when processing PTB | ||
╭─[4:1] | ||
3 │ --assig | ||
4 │ --splitcoins | ||
· ──────┬───── | ||
· ╰── Unknown command '--splitcoins' | ||
5 │ --move-vec | ||
╰──── | ||
help: Did you mean '--split-coins'? | ||
|
||
× Error when processing PTB | ||
╭─[5:1] | ||
4 │ --splitcoins | ||
5 │ --move-vec | ||
· ─────┬──── | ||
· ╰── Unknown command '--move-vec' | ||
6 │ --transfer-object | ||
╰──── | ||
help: Did you mean '--move-call'? | ||
|
||
× Error when processing PTB | ||
╭─[6:1] | ||
5 │ --move-vec | ||
6 │ --transfer-object | ||
· ────────┬──────── | ||
· ╰── Unknown command '--transfer-object' | ||
╰──── | ||
help: Did you mean '--transfer-objects'? | ||
|
||
× Error when processing PTB | ||
╭─[6:18] | ||
5 │ --move-vec | ||
6 │ --transfer-object | ||
· ▲ | ||
· ╰── Gas budget not set. | ||
╰──── | ||
help: Use --gas-budget <u64> to set a gas budget | ||
|