mirror of
https://github.com/str4d/rage.git
synced 2025-04-05 11:57:41 +03:00
add value hints to rage-mount completions
This commit is contained in:
parent
daf0829142
commit
26ebfbfc88
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
use clap::{builder::Styles, ArgAction, Parser};
|
use clap::{builder::{Styles, ValueHint}, ArgAction, Parser};
|
||||||
|
|
||||||
use crate::fl;
|
use crate::fl;
|
||||||
|
|
||||||
|
@ -24,11 +24,13 @@ pub(crate) struct AgeMountOptions {
|
||||||
#[arg(help_heading = fl!("args-header"))]
|
#[arg(help_heading = fl!("args-header"))]
|
||||||
#[arg(value_name = fl!("mnt-filename"))]
|
#[arg(value_name = fl!("mnt-filename"))]
|
||||||
#[arg(help = fl!("help-arg-mnt-filename"))]
|
#[arg(help = fl!("help-arg-mnt-filename"))]
|
||||||
|
#[arg(value_hint = ValueHint::FilePath)]
|
||||||
pub(crate) filename: String,
|
pub(crate) filename: String,
|
||||||
|
|
||||||
#[arg(help_heading = fl!("args-header"))]
|
#[arg(help_heading = fl!("args-header"))]
|
||||||
#[arg(value_name = fl!("mnt-mountpoint"))]
|
#[arg(value_name = fl!("mnt-mountpoint"))]
|
||||||
#[arg(help = fl!("help-arg-mnt-mountpoint"))]
|
#[arg(help = fl!("help-arg-mnt-mountpoint"))]
|
||||||
|
#[arg(value_hint = ValueHint::DirPath)]
|
||||||
pub(crate) mountpoint: String,
|
pub(crate) mountpoint: String,
|
||||||
|
|
||||||
#[arg(action = ArgAction::Help, short, long)]
|
#[arg(action = ArgAction::Help, short, long)]
|
||||||
|
@ -51,5 +53,6 @@ pub(crate) struct AgeMountOptions {
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
#[arg(value_name = fl!("identity"))]
|
#[arg(value_name = fl!("identity"))]
|
||||||
#[arg(help = fl!("help-flag-identity"))]
|
#[arg(help = fl!("help-flag-identity"))]
|
||||||
|
#[arg(value_hint = ValueHint::FilePath)]
|
||||||
pub(crate) identity: Vec<String>,
|
pub(crate) identity: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue