Skip to content

Commit 75fd2b9

Browse files
authored
Merge pull request #23 from ckaznable/flags
feat: add short flags for --fps and --tps
2 parents 754e64b + 9531cc6 commit 75fd2b9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Usage: tenki [OPTIONS]
4444
4545
Options:
4646
--mode <MODE> [default: rain] [rain, snow, meteor]
47-
--fps <FPS> Frame Per Second [default: 60] [1-240]
48-
--tps <TPS> Tick Per Second [default: 60] [1-240]
47+
-f --fps <FPS> Frame Per Second [default: 60] [1-240]
48+
-t --tps <TPS> Tick Per Second [default: 60] [1-240]
4949
--show-fps Show fps at right-top in screen
5050
--timer-color <COLOR> Timer color [default: white] [red, green, blue, yellow, cyan, magenta, white, black]
51-
--wind <WIND> Decide on the direction of the rain/snow [defualt: random] [random, disable, only-right, only-left, right, left]
51+
--wind <WIND> Decide on the direction of the rain/snow [default: random] [random, disable, only-right, only-left, right, left]
5252
-l, --level <LEVEL> Effect level, The lower, the stronger [default: 50] [4-1000]
5353
-h, --help Print help
5454
-V, --version Print version

src/cli.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ pub struct Args {
1313
pub mode: Mode,
1414

1515
/// frame per second
16-
#[arg(long, value_parser = process_rate_range, default_value_t = 60)]
16+
#[arg(short, long, value_parser = process_rate_range, default_value_t = 60)]
1717
pub fps: u8,
1818

1919
/// tick per second
20-
#[arg(long, value_parser = process_rate_range, default_value_t = 60)]
20+
#[arg(short, long, value_parser = process_rate_range, default_value_t = 60)]
2121
pub tps: u8,
2222

2323
/// effect level, The lower, the stronger [4-1000]

0 commit comments

Comments
 (0)