cli: Add `--config` option to `rad self`
This commit is contained in:
parent
d9240c9ae9
commit
a46c6ff36d
|
|
@ -189,6 +189,12 @@ description and default branch by running:
|
||||||
|
|
||||||
$ rad inspect --payload
|
$ rad inspect --payload
|
||||||
|
|
||||||
|
=== Configuration
|
||||||
|
|
||||||
|
Radicle keeps a configuration file at *~/.radicle/config.json* by default. To
|
||||||
|
display its exact location on your system, you can use the *rad self --config*
|
||||||
|
command.
|
||||||
|
|
||||||
=== Environment
|
=== Environment
|
||||||
|
|
||||||
Various environment variables are used by *rad*.
|
Various environment variables are used by *rad*.
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ Options
|
||||||
--nid Show your Node ID (NID)
|
--nid Show your Node ID (NID)
|
||||||
--did Show your DID
|
--did Show your DID
|
||||||
--home Show your Radicle home
|
--home Show your Radicle home
|
||||||
|
--config Show the location of your configuration file
|
||||||
--ssh-key Show your public key in OpenSSH format
|
--ssh-key Show your public key in OpenSSH format
|
||||||
--ssh-fingerprint Show your public key fingerprint in OpenSSH format
|
--ssh-fingerprint Show your public key fingerprint in OpenSSH format
|
||||||
--help Show help
|
--help Show help
|
||||||
|
|
@ -34,6 +35,7 @@ enum Show {
|
||||||
NodeId,
|
NodeId,
|
||||||
Did,
|
Did,
|
||||||
Home,
|
Home,
|
||||||
|
Config,
|
||||||
SshKey,
|
SshKey,
|
||||||
SshFingerprint,
|
SshFingerprint,
|
||||||
All,
|
All,
|
||||||
|
|
@ -65,6 +67,9 @@ impl Args for Options {
|
||||||
Long("home") if show.is_none() => {
|
Long("home") if show.is_none() => {
|
||||||
show = Some(Show::Home);
|
show = Some(Show::Home);
|
||||||
}
|
}
|
||||||
|
Long("config") if show.is_none() => {
|
||||||
|
show = Some(Show::Config);
|
||||||
|
}
|
||||||
Long("ssh-key") if show.is_none() => {
|
Long("ssh-key") if show.is_none() => {
|
||||||
show = Some(Show::SshKey);
|
show = Some(Show::SshKey);
|
||||||
}
|
}
|
||||||
|
|
@ -103,6 +108,9 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
||||||
Show::Home => {
|
Show::Home => {
|
||||||
term::print(profile.home().display());
|
term::print(profile.home().display());
|
||||||
}
|
}
|
||||||
|
Show::Config => {
|
||||||
|
term::print(profile.home.config().display());
|
||||||
|
}
|
||||||
Show::SshKey => {
|
Show::SshKey => {
|
||||||
term::print(ssh::fmt::key(profile.id()));
|
term::print(ssh::fmt::key(profile.id()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue