hex_patch/
args.rs

1use std::path::PathBuf;
2
3#[derive(Debug, clap::Parser)]
4#[command(name = "hex-patch", about, version, author)]
5pub struct Args {
6    #[arg(
7        short,
8        long,
9        help = "The connection string to the remote server, in the format <user>@<host>[:<port>]"
10    )]
11    pub ssh: Option<String>,
12    #[arg(
13        short = 'w',
14        long,
15        help = "The password to use for SSH connection, if not specified, keypair authentication will be used.",
16        requires = "ssh"
17    )]
18    pub password: Option<String>,
19    #[arg(short, long, help = "The configuration file to use")]
20    pub config: Option<PathBuf>,
21    #[arg(short, long, help = "The plugin directory to use")]
22    pub plugins: Option<PathBuf>,
23    #[arg(
24        index = 1,
25        help = "The starting path of the editor",
26        default_value = "./"
27    )]
28    pub path: String,
29}