Skip to content

Commit 40295e8

Browse files
committed
Upgraded clap 🤨
1 parent 78076a6 commit 40295e8

File tree

4 files changed

+22
-136
lines changed

4 files changed

+22
-136
lines changed

‎Cargo.lock‎

Lines changed: 5 additions & 125 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "fli"
3-
version = "1.1.1"
3+
version = "1.2.0"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
clap = "3.0.0-beta.5"
9+
clap = "~3.1"

‎README.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ When the path contains only root directory, it will be created along with `__ini
2222
fli new file -n <name> <path>
2323
```
2424

25-
This command will create a new file called `<name>.py` in current directory when path is empty or at the specified directory.
25+
This command will create a new file called `<name>.py` in current directory when path is empty or at the specified directory.
26+
27+
## Build instructions
28+
29+
```shell
30+
cargo build -r
31+
```

‎src/main.rs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
use clap::{App, Arg, ArgMatches};
1+
use clap::{Command, Arg, ArgMatches};
22
use std::fs::{self, File};
33
use std::io::Write;
44
use std::path::Path;
55

66
fn main() {
7-
let matches = App::new("fli")
7+
let matches = Command::new("fli")
88
.subcommand(
9-
App::new("new")
9+
Command::new("new")
1010
.about("Create something new")
1111
.version("1.0")
1212
.author("Sarah Gebauer <sarah@sarahgebauer.com>")
1313
.subcommand(
14-
App::new("package")
14+
Command::new("package")
1515
.about("Create new package")
1616
.version("1.0")
1717
.author("Sarah Gebauer <sarah@sarahgebauer.com>")
18-
.arg(Arg::new("path").about("path to package")),
18+
.arg(Arg::new("path").help("path to package")),
1919
)
2020
.subcommand(
21-
App::new("file")
21+
Command::new("file")
2222
.about("Create a new file")
2323
.version("1.0")
2424
.author("Sarah Gebauer <sarah@sarahgebauer.com>")
2525
.arg(
2626
Arg::new("name")
27-
.about("Name of the python file")
27+
.help("Name of the python file")
2828
.short("n".parse().unwrap())
2929
.long("name")
3030
.takes_value(true),
3131
)
3232
.arg(Arg::new("path")
33-
.about("path to file's directory")),
33+
.help("path to file's directory")),
3434
),
3535
)
3636
.get_matches();

0 commit comments

Comments
 (0)