vaeth / eix

eix can access Gentoo portage ebuild information and description very quickly (using a local cache). It can also be used to access information on installed packages, local settings, and local and external overlays, and informs about changes in the tree
GNU General Public License v2.0
166 stars 14 forks source link

eix -r/--regex option should be case-sensitive by default #110

Closed flexibeast closed 1 year ago

flexibeast commented 1 year ago

i created a bug on b.g.o for this, but josef64 on #gentoo suggested i open an issue here.

Someone on #gentoo was wondering how to do a case-sensitive search with eix. It turns out that -e --substring is the answer, but i was surprised to find that the -r/--regex option is case-insensitive, with (i believe) no way of changing this. The standard behaviour of regex implementations is to be case-sensitive unless specified otherwise (e.g. via /i in Perl), so i believe eix's behaviour in this regard violates the principle of least surprise.

vaeth commented 1 year ago

eix-0.36.7 has a new --regex-case option, and this option is chosen by default if normally a regex would be the default, but the pattern contains an uppercase character.