summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyborus <cyborus@noreply.codeberg.org>2024-04-19 01:05:20 +0200
committerCyborus <cyborus@noreply.codeberg.org>2024-04-19 01:05:20 +0200
commitcbf04f9aef60831e7770fece48b13d3701eef5a3 (patch)
treee4a47253c0f9d9a74d3993f9add6a98d19ad8b00
parentMerge pull request 'don't print url scheme in `fj user`' (#46) from user-no-s... (diff)
parentrename `fj user` to `fj whoami` (diff)
downloadforgejo-cli-cbf04f9aef60831e7770fece48b13d3701eef5a3.tar.xz
forgejo-cli-cbf04f9aef60831e7770fece48b13d3701eef5a3.zip
Merge pull request 'rename `fj user` to `fj whoami`' (#47) from whoami into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/47
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index fa3293e..df44645 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -23,7 +23,8 @@ pub enum Command {
#[clap(subcommand)]
Repo(repo::RepoCommand),
Issue(issues::IssueCommand),
- User {
+ #[command(name = "whoami")]
+ WhoAmI {
#[clap(long, short)]
remote: Option<String>,
},
@@ -42,7 +43,7 @@ async fn main() -> eyre::Result<()> {
match args.command {
Command::Repo(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())
.wrap_err("could not find host, try specifying with --host")?
.host_url()