justpath icon indicating copy to clipboard operation
justpath copied to clipboard

--exclude is not used for --count

Open mikeckennedy opened this issue 1 year ago • 3 comments

There are a few directories inserted by macOS that I cannot control. But they also do not exist. I'd like to be able to write commands like:

justpath --exclude somedir --count

But --count reports 3 missing directories, even though those directories contain somedir text.

Thanks for the cool util.

mikeckennedy avatar Apr 02 '24 18:04 mikeckennedy

Thanks for hosting the podcast, will need to have a look at the recording.

Will check out the --count and --exclude order, thanks for bringing that in!

epogrebnyak avatar Apr 06 '24 14:04 epogrebnyak

You're welcome and thanks for having a look at the combo of those two params.

mikeckennedy avatar Apr 06 '24 22:04 mikeckennedy

Originally, --count was a standalone command and overall intent was to show the stats for the PATH, so that a user might get a big picture of how many direcotries are there. It is possible to combine -- count with --include and --exclude flag, then the --count flag would act more like a finaliser, similar to adding | wc -l at the end of some command.

Will need to change the wording of output, now it says "n directories on your PATH", should either be just "n directories" or "n directories on your PATH (after flags)". The current message refers directly to whole PATH and I would need to change it (just keeping note).

epogrebnyak avatar Apr 07 '24 03:04 epogrebnyak