Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsd --directory-only --tree --depth 2 #747

Open
sizur opened this issue Sep 20, 2022 · 3 comments · May be fixed by #864
Open

lsd --directory-only --tree --depth 2 #747

sizur opened this issue Sep 20, 2022 · 3 comments · May be fixed by #864
Labels
kind/bug Something isn't working

Comments

@sizur
Copy link

sizur commented Sep 20, 2022

  • os: Darwin, Linux
  • lsd --version: lsd 0.22.0
  • echo $TERM: xterm-256color
  • echo $LS_COLORS: irrelevant

Expected behavior

tree -dL 2 shows directory structure with depth of 2.

Actual behavior

lsd --directory-only --tree --depth 2 fails with error:

error: The argument '--depth <num>...' cannot be used with '--directory-only'

USAGE:
    lsd --color <color>... --date <date>... --depth <num>... --directory-only --hyperlink <hyperlink>... --icon <icon>... --icon-theme <icon-theme>... --ignore-glob <pattern>... --permission <permission>... --size <size>... --tree

For more information try --help
@meain meain added the kind/bug Something isn't working label Sep 21, 2022
@roopeshvs
Copy link

Removing conflicts_with field for depth from the directory-only arg, without any other change, seems to get the expected behaviour.
https://github.com/Peltoche/lsd/blob/586e1c9e76a9bbb8c5ae6fdb5bdc1ed6f090e32e/src/app.rs#L131

@meain
Copy link
Member

meain commented Oct 5, 2022

I don't remember what but I trying to do that and it causing some issue when used without tree. Just give it a shot and if you don't find any problems, feel free to open a PR for this change.

nim65s added a commit to nim65s/lsd that referenced this issue Jun 25, 2023
@nim65s nim65s linked a pull request Jun 25, 2023 that will close this issue
5 tasks
@nim65s
Copy link

nim65s commented Jun 25, 2023

Hi,

I couldn't find any issue, in the sense that lsd --directory-only and lsd --directory-only **.rs behave in the same way before and after the change, so I opened a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants