diff options
author | Doug Elkin <doug@dougelkin.com> | 2022-09-08 23:33:58 -0400 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2022-09-10 12:01:11 +0530 |
commit | 0d8c2c4d9c72efc8344ef08009bb679a6e6de82f (patch) | |
tree | 52cdf4416a8eb78daf26ae1f73f989282eaec513 | |
parent | a2cabdf5b9ee3cbc40fe8538ee56537dbf68f95b (diff) |
use ValueHint::AnyPath on FILE argument
This fixes an issue with path completion in ZSH.
-rw-r--r-- | src/app.rs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,10 +1,15 @@ -use clap::{App, Arg}; +use clap::{App, Arg, ValueHint}; pub fn build() -> App<'static> { App::new("lsd") .version(env!("CARGO_PKG_VERSION")) .about(env!("CARGO_PKG_DESCRIPTION")) - .arg(Arg::with_name("FILE").multiple(true).default_value(".")) + .arg( + Arg::with_name("FILE") + .multiple(true) + .default_value(".") + .value_hint(ValueHint::AnyPath), + ) .arg( Arg::with_name("all") .short('a') |