Skip to content

Commit c9eac01

Browse files
committed
Split out edit into another module and added error handling.
1 parent e4d9d28 commit c9eac01

6 files changed

Lines changed: 439 additions & 516 deletions

File tree

src/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
6/6/25 - v0.2.4
44
Addded "reorder" option for menu config.
5+
Split out edit to another module and rewrote for error handling of escape/cntrl-C.
56

67
05/26/25
78
Adding tests and codecov for future cleanup/implementation - not yet active.

src/csv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
config::{CommandOption, Config}, // Importing Config struct
3-
menu::print_command_table,
3+
menu_edit::print_commands,
44
utils::pause,
55
};
66
use inquire::Select; // Importing Select prompt from inquire crate
@@ -36,7 +36,7 @@ pub fn import_commands(config: &mut Config, changes_made: &mut bool) {
3636

3737
let num_commands = commands.len();
3838
println!("Found {num_commands} commands from {path}");
39-
print_command_table(&commands);
39+
print_commands(&commands);
4040

4141
let menu_options = vec![
4242
"a. APPEND to current commands",

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
mod config;
22
mod csv;
3-
mod menu;
3+
mod menu_edit;
4+
mod menu_main;
45
mod utils;
56

67
fn main() {
@@ -18,5 +19,5 @@ fn main() {
1819
}
1920
};
2021
//Execute the display_menu function from the menu module with the config file from previous function
21-
menu::display_menu(&config_path);
22+
menu_main::display_menu(&config_path);
2223
}

0 commit comments

Comments
 (0)