forked from mincomk/rsh
add watch
This commit is contained in:
@@ -139,9 +139,12 @@ async fn main() {
|
||||
async fn run() -> Result<()> {
|
||||
let cli = Cli::parse();
|
||||
let cfg = Config::load()?;
|
||||
if let Cmd::Watch(a) = cli.cmd {
|
||||
return cmd::watch::run_with_reconnect(&cfg, a.session).await;
|
||||
}
|
||||
let client = AuthedClient::connect(&cfg).await?;
|
||||
match cli.cmd {
|
||||
Cmd::Watch(a) => cmd::watch::run(&client, a.session).await,
|
||||
Cmd::Watch(_) => unreachable!(),
|
||||
Cmd::Session(s) => match s.sub {
|
||||
SessionSub::Create { name } => cmd::session::create(&client, name).await,
|
||||
SessionSub::Delete { name, yes, disconnect } => cmd::session::delete(&client, name, yes, disconnect).await,
|
||||
|
||||
Reference in New Issue
Block a user