diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index a41bdfe..78bca92 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,6 +44,7 @@ pub enum RepoCommand { push: bool }, Info, + Browse, } #[derive(Subcommand, Clone, Debug)] @@ -149,6 +150,11 @@ async fn main() -> eyre::Result<()> { None => eprintln!("repo not found"), } } + RepoCommand::Browse => { + let (host_domain, host_keys, repo) = keys.get_current_host_and_repo().await?; + let (_, user) = host_keys.get_current_user()?; + open::that(format!("http://{host_domain}/{}/{repo}", user.name))?; + } }, Command::User { host } => { let (host_domain, host_keys) = match host.as_deref() { |