cli: rename the status subcommand to show

add missed licence headers
This commit is contained in:
Dmitriy Pleshevskiy 2022-08-18 11:37:52 +03:00
parent 8f9d53ccb3
commit 66c950f6ab
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
14 changed files with 186 additions and 5 deletions

View file

@ -23,8 +23,8 @@ pub mod list;
pub mod pause; pub mod pause;
pub mod priority; pub mod priority;
pub mod remove; pub mod remove;
pub mod show;
pub mod start; pub mod start;
pub mod status;
#[derive(clap::Parser)] #[derive(clap::Parser)]
#[clap(author, version, about = "Experemental task manager")] #[clap(author, version, about = "Experemental task manager")]
@ -42,11 +42,12 @@ pub enum SubCommand {
Priority(self::priority::Args), Priority(self::priority::Args),
#[clap(visible_alias("ls"))] #[clap(visible_alias("ls"))]
List, List,
#[clap(visible_alias("st"))]
Start(self::start::Args), Start(self::start::Args),
Pause, Pause,
Finish(self::finish::Args), Finish(self::finish::Args),
#[clap(visible_alias("st"))] #[clap(visible_alias("sh"))]
Status(self::status::Args), Show(self::show::Args),
} }
pub fn print_task_detail(task: &domain::Task) { pub fn print_task_detail(task: &domain::Task) {

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::{ use crate::{
cli::print_task_detail, cli::print_task_detail,
repo::{self, Repository}, repo::{self, Repository},

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use std::path::PathBuf; use std::path::PathBuf;
use crate::cli::print_task_detail; use crate::cli::print_task_detail;

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::cli::print_task_detail; use crate::cli::print_task_detail;
use crate::repo::{self, Repository}; use crate::repo::{self, Repository};

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::domain::CurrentTaskInfo; use crate::domain::CurrentTaskInfo;
use crate::repo::Repository; use crate::repo::Repository;

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::cli::print_task_detail; use crate::cli::print_task_detail;
use crate::repo::{self, Repository}; use crate::repo::{self, Repository};

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::cli::print_task_detail; use crate::cli::print_task_detail;
use crate::repo::{self, Repository}; use crate::repo::{self, Repository};

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::{ use crate::{
cli::print_task_detail, cli::print_task_detail,
repo::{self, Repository}, repo::{self, Repository},

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::cli::print_task_detail; use crate::cli::print_task_detail;
use crate::domain::CurrentTaskInfo; use crate::domain::CurrentTaskInfo;
use crate::repo::Repository; use crate::repo::Repository;

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use crate::{ use crate::{
cli::print_task_detail, cli::print_task_detail,
repo::{self, Repository}, repo::{self, Repository},

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use std::path::PathBuf; use std::path::PathBuf;
pub type TaskId = usize; pub type TaskId = usize;

View file

@ -65,8 +65,8 @@ fn main() {
cli::SubCommand::Finish(args) => { cli::SubCommand::Finish(args) => {
cli::finish::execute(repo, args); cli::finish::execute(repo, args);
} }
cli::SubCommand::Status(args) => { cli::SubCommand::Show(args) => {
cli::status::execute(repo, args); cli::show::execute(repo, args);
} }
} }
} }

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
pub mod fs; pub mod fs;
use std::path::PathBuf; use std::path::PathBuf;

View file

@ -1,3 +1,18 @@
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
//!
//! tas is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! tas is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
//!
use std::fs::File; use std::fs::File;
use std::io::Write; use std::io::Write;
use std::path::PathBuf; use std::path::PathBuf;