commit be1efce6e87ae5d360caca24f151a9b1d4cf7959 Author: mindfreq <144544047+mindfreq@users.noreply.github.com> Date: Wed Apr 22 11:22:24 2026 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..5a23684 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "m-grep" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..1a1523f --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "m-grep" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..0a73d86 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,23 @@ + + +pub struct Config { + search_text: String, + file_path: String, + ignor_case: bool, +} + +impl Config { + pub fn build(mut args: Vec) -> () { + args.remove(0); // Remove program path + + println!("{:?}", args); + // Self { + + // } + () + } + + fn is_ignore_case(args: Vec) { + + } +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..153c6c1 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,5 @@ + +fn main() { + let args: Vec = std::env::args().collect(); + m_grep::Config::build(args); +}