mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Add clap for parsing command line arguments
This commit is contained in:
parent
58c0ee5cb8
commit
0b5fa70957
4 changed files with 94 additions and 8 deletions
12
src/app.rs
12
src/app.rs
|
@ -97,7 +97,7 @@ pub enum AppMode {
|
|||
TaskError,
|
||||
}
|
||||
|
||||
pub struct App {
|
||||
pub struct TaskwarriorTUIApp {
|
||||
pub should_quit: bool,
|
||||
pub state: TableState,
|
||||
pub cursor_location: usize,
|
||||
|
@ -111,9 +111,9 @@ pub struct App {
|
|||
pub mode: AppMode,
|
||||
}
|
||||
|
||||
impl App {
|
||||
pub fn new() -> App {
|
||||
let mut app = App {
|
||||
impl TaskwarriorTUIApp {
|
||||
pub fn new() -> TaskwarriorTUIApp {
|
||||
let mut app = TaskwarriorTUIApp {
|
||||
should_quit: false,
|
||||
state: TableState::default(),
|
||||
tasks: vec![],
|
||||
|
@ -724,7 +724,7 @@ impl App {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::app::App;
|
||||
use crate::app::TaskwarriorTUIApp;
|
||||
use crate::util::setup_terminal;
|
||||
use std::io::stdin;
|
||||
|
||||
|
@ -733,7 +733,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_app() {
|
||||
let mut app = App::new();
|
||||
let mut app = TaskwarriorTUIApp::new();
|
||||
app.update();
|
||||
|
||||
//println!("{:?}", app.tasks);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue