Lsd: Argument '--depth <num>' cannot be used multiple times

Created on 4 Nov 2019  路  1Comment  路  Source: Peltoche/lsd

I often set what I consider to be sane defaults in my aliases.
E.g., alias lt="lsd --tree --depth 2"

So that when I run I run a command, lt for example, I will more often than not get the output that I want.

When I want to override my defaults, such as depth, I will just append them to my aliased command, # lt --depth 5.

Expected behavior

My expectation is that the most recent argument overrides the oldest.

In this case: lsd --tree --depth 2 --depth 5, I would expect a tree of depth 5, not 2, to be produced.

Actual behavior

An argument parsing error:

error: The argument '--depth <num>' was provided more than once, but cannot be used multiple times

USAGE:
    lsd --blocks <blocks>... --color <color>... --date <date>... --depth <num> --group-dirs <group-dirs>... --icon <icon>... --icon-theme <icon-theme>... --classify --long --size <size>... --tree

For more information try --help
good first issue kinbug

Most helpful comment

Hi @nathanph, thanks for the report.

This seems to be a fair request. Some of the flags seems to already have this feature. I guess we will have to align all the other flags on it.

>All comments

Hi @nathanph, thanks for the report.

This seems to be a fair request. Some of the flags seems to already have this feature. I guess we will have to align all the other flags on it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cengizIO picture cengizIO  路  3Comments

rediffusion picture rediffusion  路  5Comments

hawkw picture hawkw  路  5Comments

Phuker picture Phuker  路  5Comments

jcassee picture jcassee  路  5Comments