Skip to content

Commit

Permalink
Merge pull request #9 from k3ii/creates
Browse files Browse the repository at this point in the history
Correct category slugs
  • Loading branch information
k3ii authored Sep 1, 2024
2 parents db05d17 + bad1d5f commit d5f86b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/k3ii/qdir"
homepage = "https://github.com/k3ii/qdir"
readme = "README.md"
keywords = ["cli"]
categories = ["cli"]
categories = ["command-line-utilities"]

[dependencies]
clap = { version = "4.5.16", features = ["derive", "cargo"] }
Expand Down
8 changes: 0 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,4 @@ pub fn make_dir(depth: u8, name_length: usize, name: bool, pet: bool, tmp: bool)
fs::create_dir_all(&path).expect("Failed to create directory");

println!("{}", path.display());

let name = get_random_name().unwrap_or_else(|| String::from("default_name"));
let pet = get_random_pet()
.unwrap_or_else(|| "default_pet")
.to_string();

println!("Name: {}", name);
println!("Pet: {}", pet);
}
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clap::{command, Arg};
use clap::{command, Arg, ArgGroup};
use qdir::make_dir;

fn main() {
Expand Down Expand Up @@ -41,6 +41,11 @@ fn main() {
.action(clap::ArgAction::SetTrue)
.help("Use the system's temporary directory"),
)
.group(
ArgGroup::new("name_or_pet_length")
.args(&["name", "pet", "length"])
.required(false),
)
.get_matches();

let depth = matches
Expand Down

0 comments on commit d5f86b4

Please sign in to comment.