feat(cli): added jump command

Still not implemented!

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2023-07-08 07:03:01 +02:00
parent fad27cce55
commit 082ab57957
3 changed files with 20 additions and 0 deletions

View file

@ -1,5 +1,7 @@
#+title: Roadmap #+title: Roadmap
* 0.2.1
- [ ] jumps
* 0.2.0 (maybe) * 0.2.0 (maybe)
- [X] Links in categories? - [X] Links in categories?
- [X] Fix category with no links - [X] Fix category with no links

View file

@ -109,4 +109,19 @@ pub enum Commands {
/// Perform a git commit in all repositories, with predefined message /// Perform a git commit in all repositories, with predefined message
#[command(visible_alias = "m")] #[command(visible_alias = "m")]
CommitMsg { msg: Option<String> }, CommitMsg { msg: Option<String> },
/// Jump to a given object
#[command(subcommand, visible_alias = "j")]
Jump(JumpCommands),
}
#[derive(Subcommand, Debug)]
pub enum JumpCommands {
/// Jump to repo
#[command(visible_alias = "r")]
Repo { name: Option<String> },
/// Jump to link
#[command(visible_alias = "l")]
Link { name: Option<String> },
} }

View file

@ -107,6 +107,9 @@ fn main() {
Some(Commands::CommitMsg { msg }) => { Some(Commands::CommitMsg { msg }) => {
config.commit_all_msg(msg.as_ref().expect("failed to get message from input")); config.commit_all_msg(msg.as_ref().expect("failed to get message from input"));
} }
Some(Commands::Jump(_)) => {
todo!();
}
None => (), None => (),
} }
trace!("{:?}", config); trace!("{:?}", config);