From 0d8c2c4d9c72efc8344ef08009bb679a6e6de82f Mon Sep 17 00:00:00 2001 From: Doug Elkin Date: Thu, 8 Sep 2022 23:33:58 -0400 Subject: [PATCH] use ValueHint::AnyPath on FILE argument This fixes an issue with path completion in ZSH. --- src/app.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index 29909eb..1e9357f 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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')