Add --version flags and more to all binaries
This commit is contained in:
@@ -19,6 +19,11 @@ use clap::Parser;
|
||||
/// If standard output is a socket, finger will emit a carriage return (^M) before every linefeed (^J).
|
||||
/// This is for processing remote finger requests when invoked by the daemon.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version,
|
||||
)]
|
||||
pub struct Args {
|
||||
/// Forces finger to use IPv4 addresses only.
|
||||
#[arg(long, short = '4', conflicts_with = "ipv6")]
|
||||
|
||||
@@ -18,6 +18,11 @@ use tokio::{net::UdpSocket, sync::RwLock};
|
||||
use tracing_subscriber::{EnvFilter, fmt, layer::SubscriberExt, util::SubscriberInitExt};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version
|
||||
)]
|
||||
struct Args {
|
||||
/// Path to configuration file
|
||||
#[arg(
|
||||
|
||||
@@ -6,6 +6,11 @@ use clap::Parser;
|
||||
/// The output shows the current time of day, how long the system has been up, and the load averages.
|
||||
/// The load average numbers give the number of jobs in the run queue averaged over 1, 5 and 15 minutes.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version,
|
||||
)]
|
||||
pub struct Args {
|
||||
/// The hosts to query.
|
||||
hosts: Vec<String>,
|
||||
|
||||
@@ -11,6 +11,11 @@ use roowho2_lib::{proto::WhodStatusUpdate, server::rwhod::RwhodClientProxy};
|
||||
///
|
||||
/// Machines for which no status report has been received for 11 minutes are shown as being down.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version
|
||||
)]
|
||||
pub struct Args {
|
||||
/// Users idle an hour or more are not counted unless the `-a` flag is given.
|
||||
#[arg(long, short)]
|
||||
@@ -120,7 +125,7 @@ fn old_format_machine_entry(all: bool, entry: &WhodStatusUpdate) -> String {
|
||||
let uptime_str = if days > 0 {
|
||||
format!("{:3}+{:02}:{:02}", days, hours, minutes)
|
||||
} else if uptime_minutes < 0 || days > 999 {
|
||||
format!(" ??:??")
|
||||
" ??:??".to_string()
|
||||
} else {
|
||||
format!(" {:2}:{:02}", hours, minutes)
|
||||
};
|
||||
|
||||
@@ -8,6 +8,11 @@ use clap::Parser;
|
||||
/// the host-name with the names of the users currently logged on is printed on each line.
|
||||
/// The `rusers` command will wait for one minute to catch late responders.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version,
|
||||
)]
|
||||
pub struct Args {
|
||||
/// Print all machines responding even if no one is currently logged in
|
||||
#[arg(long, short)]
|
||||
|
||||
@@ -5,6 +5,11 @@ use clap::Parser;
|
||||
/// The `rwall` command sends a message to the users logged into the specified host.
|
||||
/// The message to be sent can be typed in and terminated with EOF or it can be in a file
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version,
|
||||
)]
|
||||
pub struct Args {
|
||||
/// The host to send the message to
|
||||
host: String,
|
||||
|
||||
@@ -12,6 +12,11 @@ use roowho2_lib::{proto::WhodUserEntry, server::rwhod::RwhodClientProxy};
|
||||
/// If a user hasn't typed to the system for an hour or more,
|
||||
/// then the user will be omitted from the output of `rwho` unless the `-a` flag is given.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version
|
||||
)]
|
||||
pub struct Args {
|
||||
/// Print all machines responding even if no one is currently logged in
|
||||
#[arg(long, short)]
|
||||
|
||||
Reference in New Issue
Block a user