rename fj user to fj whoami

This commit is contained in:
Cyborus 2024-04-18 18:53:36 -04:00
parent 4061f79e75
commit 4ac90b6ea9
No known key found for this signature in database

View file

@ -23,7 +23,8 @@ pub enum Command {
#[clap(subcommand)] #[clap(subcommand)]
Repo(repo::RepoCommand), Repo(repo::RepoCommand),
Issue(issues::IssueCommand), Issue(issues::IssueCommand),
User { #[command(name = "whoami")]
WhoAmI {
#[clap(long, short)] #[clap(long, short)]
remote: Option<String>, remote: Option<String>,
}, },
@ -42,7 +43,7 @@ async fn main() -> eyre::Result<()> {
match args.command { match args.command {
Command::Repo(subcommand) => subcommand.run(&keys, host_name).await?, Command::Repo(subcommand) => subcommand.run(&keys, host_name).await?,
Command::Issue(subcommand) => subcommand.run(&keys, host_name).await?, Command::Issue(subcommand) => subcommand.run(&keys, host_name).await?,
Command::User { remote } => { Command::WhoAmI { remote } => {
let url = repo::RepoInfo::get_current(host_name, None, remote.as_deref()) let url = repo::RepoInfo::get_current(host_name, None, remote.as_deref())
.wrap_err("could not find host, try specifying with --host")? .wrap_err("could not find host, try specifying with --host")?
.host_url() .host_url()