Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Apr 8, 2024
1 parent ae03947 commit 286e855
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ the current directory. Basically, it replaces the following command:
find -iname .git -type d -execdir git fetch upstream \;
```

To specify a `--File` argument or `-F`, if you would like to search for a file
instead of a directory, use:
If you want to limit execution to files matching a certain pattern only specify
a `--File` argument or `-F`:

```sh
Run -F astro.config.ts npx astro add @playform/compress
Expand Down
22 changes: 6 additions & 16 deletions Source/Fn/Binary/Command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,12 @@ pub fn Fn() -> ArgMatches {
.version(env!("CARGO_PKG_VERSION"))
.author("Playform <[email protected]>")
.about("🍺 Run.")
.arg(
Arg::new("Directory")
.short('D')
.long("Directory")
.action(SetTrue)
.display_order(2)
.value_name("DIRECTORY")
.required(false)
.help("Directory."),
)
.arg(
Arg::new("File")
.short('F')
.long("File")
.action(SetTrue)
.display_order(3)
.display_order(2)
.value_name("FILE")
.required(false)
.help("File."),
Expand All @@ -32,7 +22,7 @@ pub fn Fn() -> ArgMatches {
.short('P')
.long("Parallel")
.action(SetTrue)
.display_order(4)
.display_order(3)
.value_name("PARALLEL")
.required(false)
.help("Parallel."),
Expand All @@ -41,7 +31,7 @@ pub fn Fn() -> ArgMatches {
Arg::new("Root")
.short('R')
.long("Root")
.display_order(5)
.display_order(4)
.value_name("ROOT")
.required(false)
.help("Root.")
Expand All @@ -51,15 +41,15 @@ pub fn Fn() -> ArgMatches {
Arg::new("Exclude")
.short('E')
.long("Exclude")
.display_order(6)
.display_order(5)
.value_name("EXCLUDE")
.required(false)
.help("Exclude.")
.default_value("node_modules .git target dist vendor"),
)
.arg(
Arg::new("Pattern")
.display_order(7)
.display_order(6)
.value_name("PATTERN")
.required(true)
.help("Pattern.")
Expand All @@ -68,7 +58,7 @@ pub fn Fn() -> ArgMatches {
.arg(
Arg::new("Command")
.num_args(0..=10)
.display_order(8)
.display_order(7)
.value_name("COMMAND")
.required(true)
.allow_hyphen_values(true)
Expand Down
5 changes: 1 addition & 4 deletions Source/Fn/Binary/Command/Entry.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
pub fn Fn(Option { Directory, Exclude, File, Pattern, Root, Separator, .. }: &Option) -> Return {
println!("{:?}", Directory);
println!("-----------");

pub fn Fn(Option { Exclude, File, Pattern, Root, Separator, .. }: &Option) -> Return {
WalkDir::new(Root)
.follow_links(false)
.into_iter()
Expand Down
2 changes: 0 additions & 2 deletions Source/Struct/Binary/Command/Option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub type Separator = char;
pub struct Struct {
pub Command: Command,
pub Exclude: Vec<String>,
pub Directory: bool,
pub File: bool,
pub Parallel: Parallel,
pub Pattern: Pattern,
Expand All @@ -18,7 +17,6 @@ pub struct Struct {
impl Struct {
pub fn Fn(Option { Separator, .. }: Option) -> Self {
Self {
Directory: Fn().get_flag("Directory"),
File: Fn().get_flag("File"),
Parallel: Fn().get_flag("Parallel"),
Root: Fn().get_one::<String>("Root").expect("Cannot Root.").to_owned(),
Expand Down
Binary file modified target/release/Inn.exe
Binary file not shown.
Binary file modified target/release/Innkeeper.exe
Binary file not shown.
Binary file modified target/release/PRun.exe
Binary file not shown.
Binary file modified target/release/Run.exe
Binary file not shown.

0 comments on commit 286e855

Please sign in to comment.