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

dirs fails when there is no dirs #1

Closed
LoLei opened this issue Mar 24, 2020 · 1 comment
Closed

dirs fails when there is no dirs #1

LoLei opened this issue Mar 24, 2020 · 1 comment

Comments

@LoLei
Copy link

LoLei commented Mar 24, 2020

Using the dirs argument with no present dirs in the current dir produces an arguably bad reading error.

$ ./list dirs
ls: cannot access '*/': No such file or directory

Maybe add a case for when there are no directories to produce a better output message?
Also, shouldn't it output at least the . and .. dirs anyway?

@amishbni
Copy link
Owner

amishbni commented Mar 25, 2020

I agree with the first part of your issue, when there's no directories, it shouldn't output anything. This commit should fix that.

As for the second part, I intentionally removed those directories from output, because I don't think seeing them is very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants