Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: Use `term::Table::header` where possible
Merged lorenz opened 1 year ago
7 files changed +7 -7 bcba8f5a f58af8fe
modified radicle-cli/src/commands/follow.rs
@@ -141,7 +141,7 @@ pub fn following(profile: &Profile, alias: Option<Alias>) -> anyhow::Result<()>
    let store = profile.policies()?;
    let aliases = profile.aliases();
    let mut t = term::Table::new(term::table::TableOptions::bordered());
-
    t.push([
+
    t.header([
        term::format::default(String::from("DID")),
        term::format::default(String::from("Alias")),
        term::format::default(String::from("Policy")),
modified radicle-cli/src/commands/id.rs
@@ -504,7 +504,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
            let mut revisions =
                term::Table::<7, term::Label>::new(term::table::TableOptions::bordered());

-
            revisions.push([
+
            revisions.header([
                term::format::dim(String::from("●")).into(),
                term::format::bold(String::from("ID")).into(),
                term::format::bold(String::from("Title")).into(),
modified radicle-cli/src/commands/issue.rs
@@ -664,7 +664,7 @@ where
    });

    let mut table = term::Table::new(term::table::TableOptions::bordered());
-
    table.push([
+
    table.header([
        term::format::dim(String::from("●")).into(),
        term::format::bold(String::from("ID")).into(),
        term::format::bold(String::from("Title")).into(),
modified radicle-cli/src/commands/ls.rs
@@ -148,7 +148,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
    if rows.is_empty() {
        term::print(term::format::italic("Nothing to show."));
    } else {
-
        table.push([
+
        table.header([
            "Name".into(),
            "RID".into(),
            "Visibility".into(),
modified radicle-cli/src/commands/node/control.rs
@@ -246,7 +246,7 @@ pub fn sessions(node: &Node) -> Result<Option<term::Table<4, term::Label>>, node
    let mut table = term::Table::new(term::table::TableOptions::bordered());
    let now = LocalTime::now();

-
    table.push([
+
    table.header([
        term::format::bold("Peer").into(),
        term::format::bold("Address").into(),
        term::format::bold("State").into(),
modified radicle-cli/src/commands/patch/list.rs
@@ -56,7 +56,7 @@ pub fn run(
        ..TableOptions::default()
    });

-
    table.push([
+
    table.header([
        term::format::dim(String::from("●")).into(),
        term::format::bold(String::from("ID")).into(),
        term::format::bold(String::from("Title")).into(),
modified radicle-cli/src/commands/sync.rs
@@ -320,7 +320,7 @@ fn sync_status(
    let local_nid = node.nid()?;
    let aliases = profile.aliases();

-
    table.push([
+
    table.header([
        term::format::dim(String::from("●")).into(),
        term::format::bold(String::from("Node")).into(),
        term::Label::blank(),