Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola R. Hristov <[email protected]>
  • Loading branch information
NikolaRHristov committed Apr 6, 2024
1 parent 3fd865b commit 38f9da6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ the current directory. Basically, it replaces the following command:
find -iname .git -type d -execdir git fetch upstream \;
```

You can hide the command output by specifying an `-H` or `--Hide` parameter:

```sh
Inn -H -F package.json ncu -u
```

To specify a `--File` argument or `-F`, if you would like to search for a file
instead of a directory, use:

Expand Down
10 changes: 0 additions & 10 deletions Source/Fn/Binary/Command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ pub fn Fn() -> ArgMatches {
.version(env!("CARGO_PKG_VERSION"))
.author("Nikola R. Hristov <[email protected]>")
.about("Run a command in all directories having a certain pattern.")
.arg(
Arg::new("Hide")
.short('H')
.long("Hide")
.action(SetTrue)
.display_order(1)
.value_name("HIDE")
.required(false)
.help("Hide output."),
)
.arg(
Arg::new("File")
.short('F')
Expand Down
2 changes: 2 additions & 0 deletions Source/Fn/Binary/Command/Entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pub fn Fn(Option { Exclude, File, Pattern, Root, Separator, .. }: &Option) -> Re
.filter_map(|Entry| {
let Path = Entry.expect("Cannot Entry.").path().display().to_string();

println!("{}", Path);

// TODO: Separate this into Entry/Exclude.rs
if !Exclude.clone().into_iter().filter(|Exclude| *Pattern != *Exclude).any(|Exclude| {
let Match = Path.contains(&Exclude);
Expand Down
4 changes: 1 addition & 3 deletions Source/Struct/Binary/Command/Entry.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pub type Type = Vec<Vec<String>>;

pub struct Struct {
pub Hide: Hide,
pub Command: Command,
pub Entry: Type,
pub Parallel: Parallel,
Expand All @@ -12,7 +11,6 @@ pub struct Struct {
impl Struct {
pub fn Fn(Option: &Option) -> Self {
Self {
Hide: Option.Hide.clone(),
Command: Option.Command.clone(),
Entry: crate::Fn::Binary::Command::Entry::Fn(Option),
Parallel: Option.Parallel,
Expand All @@ -23,5 +21,5 @@ impl Struct {
}

use crate::Struct::Binary::Command::Option::{
Command, Hide, Parallel, Pattern, Separator, Struct as Option,
Command, Parallel, Pattern, Separator, Struct as Option,
};
5 changes: 2 additions & 3 deletions Source/Struct/Binary/Command/Option.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pub type Command = Vec<String>;
pub type Hide = bool;

pub type Parallel = bool;
pub type Pattern = String;
pub type Separator = char;

pub struct Struct {
pub Command: Command,
pub Exclude: Vec<String>,
pub Hide: Hide,

pub File: bool,
pub Parallel: Parallel,
pub Pattern: Pattern,
Expand All @@ -18,7 +18,6 @@ pub struct Struct {
impl Struct {
pub fn Fn(Option { Separator, .. }: Option) -> Self {
Self {
Hide: Fn().get_flag("Hide"),
File: Fn().get_flag("File"),
Parallel: Fn().get_flag("Parallel"),
Root: Fn().get_one::<String>("Root").expect("Cannot Root.").to_owned(),
Expand Down

0 comments on commit 38f9da6

Please sign in to comment.