ipinfo / cli

Official Command Line Interface for the IPinfo API (IP geolocation and other types of IP data)
https://ipinfo.io/
Apache License 2.0
1.73k stars 152 forks source link

[bug]: `grepip`'s `--include-cidrs` flag causes the program to ignore CIDRs #222

Open T145 opened 2 months ago

T145 commented 2 months ago

Running the following command on a list of IPs and CIDRs prints only the IPs.

ipinfo grepip -4hox --include-cidrs --nocolor

Intuitively, I'd suggest something like this to produce the same output:

ipinfo grepip -4hox --exclude-cidrs --nocolor
abdullahdevrel commented 1 month ago

Hi @T145,

Sorry for the late reply. Tricky stuff. I can see why this is an issue:

image

The CLI supports the following parameters:

--only-matching, -o
  print only matched IP in result line, excluding surrounding content.
--include-cidrs
  prints the CIDRs too.
--include-ranges
  prints the Ranges too.
--cidrs-only
  prints the CIDRs only.
--ranges-only
  prints the Ranges only.

I will open an internal ticket and see what the engineers think. Thank you.

CC: @max-ipinfo