From: Ian Jackson Date: Wed, 2 Jun 2021 00:22:41 +0000 (+0100) Subject: otter cli: Suppress account selection for mgmtchannel-proxy X-Git-Tag: otter-0.7.0~117 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=cec3948fd69a28cbf8c4f27dd9f63c6640eaf880;p=otter.git otter cli: Suppress account selection for mgmtchannel-proxy Signed-off-by: Ian Jackson --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index e106610a..2f040794 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -157,6 +157,7 @@ inventory::collect!(Subcommand); #[derive(Default,Debug)] pub struct SubcommandProperties { + suppress_selectaccount: bool, } pub struct SubCommandCallArgs { @@ -657,7 +658,9 @@ fn connect(ma: &MainOpts) -> Conn { if ma.superuser { chan.cmd(&MC::SetSuperuser(true))?; } - chan.cmd(&MC::SelectAccount(ma.account.clone()))?; + if ! ma.sc.props.suppress_selectaccount { + chan.cmd(&MC::SelectAccount(ma.account.clone()))?; + } chan } @@ -1982,6 +1985,7 @@ mod mgmtchannel_proxy { ordinary_subcmd!{ SSH_PROXY_SUBCMD, "connect to management channel and copy raw message data back and forth", + suppress_selectaccount: true, } }