You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thanks for the tools.
So far I've found that, by default, when you supply a directory, the tool counts the code in that directory and all its subdirectories.
But sometimes, I just want to count the current directory, not the subdirectories.
I took a quick look and there doesn't seem to be a single such option.
If the --exclude parameter is used, it is troublesome when there are many subdirectories.
I wish it could provide an option to ignore all subdirectories.
Thank you!
The text was updated successfully, but these errors were encountered:
An approach mentioned back in #676 was that we could support a wider range of use cases by allowing Tokei to optionally take a file list from stdin, which would then let it be piped into with find. Taking the proposed syntax from there, traversing a directory for files non-recursively would be done with something like find . -maxdepth 1 -type f | tokei -.
Thank you! Yes, find . -maxdepth 1 -type f | tokei - is a good way to do it.
However, I actually wrote a piece of Go code to invoke this tool. This way of writing increases the complexity of writing code. That's why I had this idea. I hope you'll think about it again. Thank you.
And-ZJ
changed the title
Proposal: Support ignore all subdirectories by a singal option.
Proposal: Support ignore all subdirectories by a single option.
Feb 20, 2025
Hello, thanks for the tools.
So far I've found that, by default, when you supply a directory, the tool counts the code in that directory and all its subdirectories.
But sometimes, I just want to count the current directory, not the subdirectories.
I took a quick look and there doesn't seem to be a single such option.
If the --exclude parameter is used, it is troublesome when there are many subdirectories.
I wish it could provide an option to ignore all subdirectories.
Thank you!
The text was updated successfully, but these errors were encountered: