add repo browse
This commit is contained in:
parent
22aad204d3
commit
d3fe4091a3
3 changed files with 44 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue