cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open T145 opened this issue 1 year ago • 1 comments

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

T145 avatar Jul 20 '24 17:07 T145

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

abdullahdevrel avatar Sep 06 '24 13:09 abdullahdevrel