mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 21:52:37 +00:00
done requested changes
This commit is contained in:
parent
3a28c71cfe
commit
fba600daee
2 changed files with 4 additions and 10 deletions
|
@ -120,8 +120,6 @@ pub fn build() -> App<'static, 'static> {
|
|||
Arg::with_name("directory-only")
|
||||
.short("d")
|
||||
.long("directory-only")
|
||||
//.conflicts_with("all")
|
||||
//.conflicts_with("almost-all")
|
||||
.conflicts_with("depth")
|
||||
.conflicts_with("recursive")
|
||||
.help("Display directories themselves, and not their contents (recursively when used with --tree)"),
|
||||
|
|
|
@ -25,16 +25,12 @@ impl Configurable<Self> for Display {
|
|||
/// corresponding `Display` variant in a [Some]. If neither of them is passed, this returns
|
||||
/// [None].
|
||||
fn from_arg_matches(matches: &ArgMatches) -> Option<Self> {
|
||||
if matches.is_present("all") {
|
||||
if matches.is_present("directory-only") {
|
||||
Some(Self::DirectoryOnly)
|
||||
} else {
|
||||
Some(Self::All)
|
||||
}
|
||||
if matches.is_present("directory-only") {
|
||||
Some(Self::DirectoryOnly)
|
||||
} else if matches.is_present("almost-all") {
|
||||
Some(Self::AlmostAll)
|
||||
} else if matches.is_present("directory-only") {
|
||||
Some(Self::DirectoryOnly)
|
||||
} else if matches.is_present("all") {
|
||||
Some(Self::All)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue