Skip to content

Commit b83c2c0

Browse files
authored
add shell completion hints for file paths (#93)
1 parent 78e6c28 commit b83c2c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/az-pim.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use azure_pim_cli::{
55
roles::{Assignments, Role, Scope},
66
PimClient,
77
};
8-
use clap::{ArgAction, Args, Command, CommandFactory, Parser, Subcommand};
8+
use clap::{ArgAction, Args, Command, CommandFactory, Parser, Subcommand, ValueHint};
99
use clap_complete::{generate, Shell};
1010
use humantime::Duration as HumanDuration;
1111
use serde::{Deserialize, Serialize};
@@ -211,7 +211,7 @@ enum ActivateSubCommand {
211211
/// Examples include '8h', '8 hours', '1h30m', '1 hour 30 minutes', '1h30m'
212212
duration: HumanDuration,
213213

214-
#[clap(long)]
214+
#[clap(long, value_hint = ValueHint::FilePath)]
215215
/// Path to a JSON config file containing a set of roles to activate
216216
///
217217
/// Example config file:
@@ -373,7 +373,7 @@ enum DeactivateSubCommand {
373373
},
374374
/// Deactivate a set of roles
375375
Set {
376-
#[clap(long)]
376+
#[clap(long, value_hint = ValueHint::FilePath)]
377377
/// Path to a JSON config file containing a set of roles to deactivate
378378
///
379379
/// Example config file:

0 commit comments

Comments
 (0)