diff --git a/radicle-cli/src/commands.rs b/radicle-cli/src/commands.rs index 97ea2ee1..6e5d16ba 100644 --- a/radicle-cli/src/commands.rs +++ b/radicle-cli/src/commands.rs @@ -8,6 +8,8 @@ pub mod rad_clone; pub mod rad_help; #[path = "commands/init.rs"] pub mod rad_init; +#[path = "commands/ls.rs"] +pub mod rad_ls; #[path = "commands/self.rs"] pub mod rad_self; #[path = "commands/track.rs"] diff --git a/radicle-cli/src/commands/help.rs b/radicle-cli/src/commands/help.rs index ffe24200..8fd62f90 100644 --- a/radicle-cli/src/commands/help.rs +++ b/radicle-cli/src/commands/help.rs @@ -19,6 +19,7 @@ const COMMANDS: &[Help] = &[ rad_self::HELP, rad_track::HELP, rad_untrack::HELP, + rad_ls::HELP, HELP, ]; diff --git a/radicle-cli/src/commands/ls.rs b/radicle-cli/src/commands/ls.rs new file mode 100644 index 00000000..6a8c57cb --- /dev/null +++ b/radicle-cli/src/commands/ls.rs @@ -0,0 +1,65 @@ +use std::ffi::OsString; + +use crate::terminal as term; +use crate::terminal::args::{Args, Error, Help}; + +use radicle::prelude::*; +use radicle::storage::{ReadRepository, WriteStorage}; + +pub const HELP: Help = Help { + name: "ls", + description: "List radicle projects and other objects", + version: env!("CARGO_PKG_VERSION"), + usage: r#" +Usage + + rad ls [