cli: Update some of the output formatting
This commit is contained in:
parent
dd7d86abb0
commit
e7cc32a278
|
|
@ -9,7 +9,7 @@ Initializing your radicle 👾 identity
|
||||||
✓ Creating your Ed25519 keypair...
|
✓ Creating your Ed25519 keypair...
|
||||||
✓ Your Radicle ID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device.
|
✓ Your Radicle ID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device.
|
||||||
|
|
||||||
👉 To create a radicle project, run `rad init` from a git repository.
|
To create a radicle project, run `rad init` from a git repository.
|
||||||
```
|
```
|
||||||
|
|
||||||
You can get the above information at all times using the `self` command:
|
You can get the above information at all times using the `self` command:
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ Now, when we go to accept the second proposal:
|
||||||
$ rad id accept 3f6ae4f8645c8b0cbcd35ea924df7b13aca52774 --no-confirm
|
$ rad id accept 3f6ae4f8645c8b0cbcd35ea924df7b13aca52774 --no-confirm
|
||||||
! Warning: Revision is out of date
|
! Warning: Revision is out of date
|
||||||
! Warning: d96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f
|
! Warning: d96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f
|
||||||
👉 Consider using 'rad id rebase' to update the proposal to the latest identity
|
* Consider using 'rad id rebase' to update the proposal to the latest identity
|
||||||
✓ Accepted proposal ✓
|
✓ Accepted proposal ✓
|
||||||
title: Add Bob
|
title: Add Bob
|
||||||
description: Add Bob as a delegate
|
description: Add Bob as a delegate
|
||||||
|
|
@ -231,9 +231,9 @@ Quorum Reached
|
||||||
|
|
||||||
Note that a warning was emitted:
|
Note that a warning was emitted:
|
||||||
|
|
||||||
** Warning: Revision is out of date
|
! Warning: Revision is out of date
|
||||||
** Warning: d96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f
|
! Warning: d96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f
|
||||||
=> Consider using 'rad id rebase' to update the proposal to the latest identity
|
* Consider using 'rad id rebase' to update the proposal to the latest identity
|
||||||
|
|
||||||
If we attempt to commit this revision, the command will fail:
|
If we attempt to commit this revision, the command will fail:
|
||||||
|
|
||||||
|
|
@ -241,7 +241,7 @@ If we attempt to commit this revision, the command will fail:
|
||||||
$ rad id commit 3f6ae4f8645c8b0cbcd35ea924df7b13aca52774 --no-confirm
|
$ rad id commit 3f6ae4f8645c8b0cbcd35ea924df7b13aca52774 --no-confirm
|
||||||
! Warning: Revision is out of date
|
! Warning: Revision is out of date
|
||||||
! Warning: d96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f
|
! Warning: d96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f
|
||||||
👉 Consider using 'rad id rebase' to update the proposal to the latest identity
|
* Consider using 'rad id rebase' to update the proposal to the latest identity
|
||||||
✗ Id failed: the identity hashes do match 'd96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f' for the revision '3f6ae4f8645c8b0cbcd35ea924df7b13aca52774'
|
✗ Id failed: the identity hashes do match 'd96f425412c9f8ad5d9a9a05c9831d0728e2338d =/= 475cdfbc8662853dd132ec564e4f5eb0f152dd7f' for the revision '3f6ae4f8645c8b0cbcd35ea924df7b13aca52774'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,5 @@ Initializing radicle 👾 project in .
|
||||||
✓ Announcing inventory..
|
✓ Announcing inventory..
|
||||||
|
|
||||||
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
|
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
|
||||||
You can show it any time by running:
|
You can show it any time by running `rad .`
|
||||||
rad .
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,9 @@ Initializing radicle 👾 project in .
|
||||||
}
|
}
|
||||||
|
|
||||||
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
|
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
|
||||||
You can show it any time by running:
|
You can show it any time by running `rad .`
|
||||||
rad .
|
|
||||||
|
|
||||||
To publish your project to the network, run:
|
To publish your project to the network, run `git push`
|
||||||
git push
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Projects can be listed with the `ls` command:
|
Projects can be listed with the `ls` command:
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,9 @@ pub fn init(options: Options) -> anyhow::Result<()> {
|
||||||
);
|
);
|
||||||
|
|
||||||
term::blank();
|
term::blank();
|
||||||
term::tip!(
|
term::info!(
|
||||||
"To create a radicle project, run {} from a git repository.",
|
"To create a radicle project, run {} from a git repository.",
|
||||||
term::format::secondary("`rad init`")
|
term::format::command("rad init")
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -276,13 +276,17 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
|
||||||
term::format::dim("(RID)"),
|
term::format::dim("(RID)"),
|
||||||
term::format::highlight(id.urn())
|
term::format::highlight(id.urn())
|
||||||
);
|
);
|
||||||
term::info!("You can show it any time by running:");
|
term::info!(
|
||||||
term::indented(term::format::secondary("rad ."));
|
"You can show it any time by running {}",
|
||||||
|
term::format::command("rad .")
|
||||||
|
);
|
||||||
|
|
||||||
if !options.announce {
|
if !options.announce {
|
||||||
term::blank();
|
term::blank();
|
||||||
term::info!("To publish your project to the network, run:");
|
term::info!(
|
||||||
term::indented(term::format::secondary(push_cmd));
|
"To publish your project to the network, run {}",
|
||||||
|
term::format::command(push_cmd)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,11 @@ pub fn parens<D: fmt::Display>(input: Paint<D>) -> Paint<String> {
|
||||||
Paint::new(format!("({})", input.item)).with_style(input.style)
|
Paint::new(format!("({})", input.item)).with_style(input.style)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Format a command suggestion, eg. `rad init`.
|
||||||
|
pub fn command<D: fmt::Display>(cmd: D) -> Paint<String> {
|
||||||
|
primary(format!("`{cmd}`"))
|
||||||
|
}
|
||||||
|
|
||||||
/// Format a COB id.
|
/// Format a COB id.
|
||||||
pub fn cob(id: &ObjectId) -> String {
|
pub fn cob(id: &ObjectId) -> String {
|
||||||
format!("{:.7}", id.to_string())
|
format!("{:.7}", id.to_string())
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,11 @@ pub fn success_args(args: fmt::Arguments) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tip_args(args: fmt::Arguments) {
|
pub fn tip_args(args: fmt::Arguments) {
|
||||||
println!("👉 {}", style(format!("{args}")).italic());
|
println!(
|
||||||
|
"{} {}",
|
||||||
|
format::yellow("*"),
|
||||||
|
style(format!("{args}")).italic()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn notice_args(args: fmt::Arguments) {
|
pub fn notice_args(args: fmt::Arguments) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue