lizmat / App-Rak

21st century grep / find / ack / ag / rg on steroids
Artistic License 2.0
152 stars 7 forks source link

Parent directory (non-)findings #44

Closed antononcube closed 3 months ago

antononcube commented 1 year ago

I expect this command to find files in the parent directory (at this point, it lists files in the current directory that have names that include ".."):

rak --find ..

I expect this command to give directories in the parent directory (at this point, gives nothing):

 rak --find --dir .. 

For comparison, this works as expected:

rak --find --dir .
lizmat commented 3 months ago

The first positional argument is always taken as the pattern to search for. And if no path is specified, the current directory will be assumed.

So rak --find .. will search for files with .. in their paths.

What you probably wanted is rak --find --paths=..

Closing as this is a bit of a WAT, but that's always the case with a lot of other DWIMs.