mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-29 14:30:31 +08:00
bin: Rename commands to apps
This commit is contained in:
@@ -85,13 +85,13 @@ home.packages = [
|
||||
|
||||
### Usage
|
||||
|
||||
This crate provides a binary called `rad-tui` which can be used as a drop-in replacement for `rad`. It maps known commands and operations to internal ones, running the corresponding interface, e.g.
|
||||
This crate provides a binary called `rad-tui` which can be used as a drop-in replacement for `rad`. It maps known commands and operations to internal ones, running the corresponding app, e.g.
|
||||
|
||||
```
|
||||
rad-tui patch
|
||||
```
|
||||
|
||||
runs the patch list interface and calls `rad` with the operation and id selected. Commands or operations not known to `rad-tui` will be forwarded to `rad`, e.g. the following just calls `rad node`:
|
||||
runs the patch list app and calls `rad` with the operation and id selected. Commands or operations not known to `rad-tui` will be forwarded to `rad`, e.g. the following just calls `rad node`:
|
||||
|
||||
```
|
||||
rad-tui node
|
||||
@@ -114,13 +114,13 @@ alias rad="rad-tui"
|
||||
|
||||
#### CLI integration via JSON
|
||||
|
||||
The interfaces are designed to be modular and could also be integrated with existing CLI tooling. The binary is can be called and its output collected and processed, e.g.
|
||||
The apps are designed to be modular and could also be integrated with existing CLI tooling. The binary is can be called and its output collected and processed, e.g.
|
||||
|
||||
```
|
||||
rad-tui patch list --json
|
||||
```
|
||||
|
||||
runs the patch list interface and return a JSON object specifying the operation and id selected:
|
||||
runs the patch list app and return a JSON object specifying the operation and id selected:
|
||||
|
||||
```
|
||||
{ "operation": "show", "ids": ["546443226b300484a97a2b2d7c7000af6e8169ba"], args:[] }
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#[path = "apps/help.rs"]
|
||||
pub mod tui_help;
|
||||
#[path = "apps/inbox.rs"]
|
||||
pub mod tui_inbox;
|
||||
#[path = "apps/issue.rs"]
|
||||
pub mod tui_issue;
|
||||
#[path = "apps/patch.rs"]
|
||||
pub mod tui_patch;
|
||||
@@ -17,7 +17,7 @@ use cli::terminal::patch::Message;
|
||||
use cli::terminal::Context;
|
||||
use cli::terminal::{Args, Error, Help};
|
||||
|
||||
use crate::commands::tui_issue::list::IssueOperation;
|
||||
use crate::apps::tui_issue::list::IssueOperation;
|
||||
use crate::terminal;
|
||||
use crate::ui::items::filter::DidFilter;
|
||||
use crate::ui::items::issue::filter::IssueFilter;
|
||||
@@ -1,8 +0,0 @@
|
||||
#[path = "commands/help.rs"]
|
||||
pub mod tui_help;
|
||||
#[path = "commands/inbox.rs"]
|
||||
pub mod tui_inbox;
|
||||
#[path = "commands/issue.rs"]
|
||||
pub mod tui_issue;
|
||||
#[path = "commands/patch.rs"]
|
||||
pub mod tui_patch;
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
mod apps;
|
||||
mod cob;
|
||||
mod commands;
|
||||
mod git;
|
||||
mod log;
|
||||
mod settings;
|
||||
@@ -20,7 +20,7 @@ use radicle::version::Version;
|
||||
|
||||
use radicle_cli::terminal as cli_term;
|
||||
|
||||
use commands::*;
|
||||
use apps::*;
|
||||
use terminal as term;
|
||||
|
||||
use crate::terminal::ForwardError;
|
||||
|
||||
Reference in New Issue
Block a user