finger: add (but don't implement) --raw flag
This commit is contained in:
@@ -117,6 +117,13 @@ pub struct Args {
|
||||
#[arg(long, short)]
|
||||
json: bool,
|
||||
|
||||
/// When fingering remote users, don't try to parse the content before displaying it,
|
||||
/// but instead just print the bytes as they are received from the remote.
|
||||
///
|
||||
/// Note that this option makes it impossible to represent remote users as JSON.
|
||||
#[arg(long, short, conflicts_with = "json")]
|
||||
raw: bool,
|
||||
|
||||
/// Generate shell completion scripts for the specified shell
|
||||
/// and print them to stdout.
|
||||
#[arg(long, value_enum, hide = true)]
|
||||
@@ -182,6 +189,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
request_info,
|
||||
request_networking,
|
||||
args.no_acct,
|
||||
args.raw,
|
||||
)
|
||||
.await
|
||||
.context("Failed to send finger request")?
|
||||
|
||||
@@ -69,6 +69,7 @@ pub trait VarlinkFingerClientProxy {
|
||||
request_info: FingerRequestInfo,
|
||||
request_networking: FingerRequestNetworking,
|
||||
disable_user_account_db: bool,
|
||||
raw_remote_output: bool,
|
||||
) -> zlink::Result<Result<VarlinkFingerResponse, VarlinkFingerClientError>>;
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@ pub enum VarlinkFingerClientRequest {
|
||||
request_info: FingerRequestInfo,
|
||||
request_networking: FingerRequestNetworking,
|
||||
disable_user_account_db: bool,
|
||||
raw_remote_output: bool,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -170,6 +172,7 @@ impl VarlinkRoowhoo2ClientServer {
|
||||
request_info: FingerRequestInfo,
|
||||
_request_networking: FingerRequestNetworking,
|
||||
_disable_user_account_db: bool,
|
||||
_raw_remote_output: bool,
|
||||
) -> VarlinkFingerResponse {
|
||||
tracing::debug!(
|
||||
user_queries = ?user_queries,
|
||||
@@ -284,6 +287,7 @@ impl zlink::Service<zlink::unix::Stream> for VarlinkRoowhoo2ClientServer {
|
||||
request_info,
|
||||
request_networking,
|
||||
disable_user_account_db,
|
||||
raw_remote_output,
|
||||
}) => {
|
||||
let result = match timeout(
|
||||
Duration::from_secs(2),
|
||||
@@ -293,6 +297,7 @@ impl zlink::Service<zlink::unix::Stream> for VarlinkRoowhoo2ClientServer {
|
||||
request_info.clone(),
|
||||
request_networking.clone(),
|
||||
*disable_user_account_db,
|
||||
*raw_remote_output,
|
||||
),
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user