epogrebnyak / justpath

Inspect and refine PATH environment variable on Windows, Linux and MacOS.
GNU General Public License v3.0
337 stars 12 forks source link

--exclude is not used for --count #24

Open mikeckennedy opened 6 months ago

mikeckennedy commented 6 months ago

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.

epogrebnyak commented 6 months ago

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!

mikeckennedy commented 6 months ago

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

epogrebnyak commented 6 months ago

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).