lizmat / App-Rak

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

invoking rak without any arguments #35

Closed demanuel closed 1 year ago

demanuel commented 1 year ago

Hi!

if i do rak without any arguments, it will do something equivalent to a cat call on all the files from the current folder.

IMHO it would be better to throw an error. For example, the rg behaviour:

demanuel@archlinux ~/Downloads> rg
error: The following required arguments were not provided:
    <PATTERN>

USAGE:

    rg [OPTIONS] PATTERN [PATH ...]
    rg [OPTIONS] -e PATTERN ... [PATH ...]
    rg [OPTIONS] -f PATTERNFILE ... [PATH ...]
    rg [OPTIONS] --files [PATH ...]
    rg [OPTIONS] --type-list
    command | rg [OPTIONS] PATTERN
    rg [OPTIONS] --help
    rg [OPTIONS] --version

For more information try --help

demanuel@archlinux ~/Downloads [2]>

I think it would be nice if we have the same kind of behaviour

lizmat commented 1 year ago

It originally had. But there are some cases where no pattern makes sense.

I guess though that not having any arguments should be an error. So noted :-)

lizmat commented 1 year ago

https://github.com/lizmat/App-Rak/commit/2f65fcca0d fixes this. Will be in the next release, which will most likely be tomorrow!

demanuel commented 1 year ago

Super! Thanks!