Trying to find out how to use case-insensitive searches in less
I found this on serverfault.
That seems to perfectly answer my question. The problem is: It doesn't work like that here (OpenSUSE 13.1; less 458).
I had aliased less
to less -WiNS
but I changed that. But even calling it as command less file
does not change anything. I have checked with ps
that there is no -i
option in the command line any more.
As the answer says the less
help (pressing h
) states that I can use -i
within less
, too. If I use that once then less
tells me it had changed to case-insensitive search (that is kind of correct: nothing changes). If I use it twice then less
tells me it had turned to case-sensitive search. And right, then it works as it should from the start. Giving -i
twice on the command line does not work, though.
What's up here?
ps
to check that? – goldilocks Feb 22 '14 at 14:05FOO
, but searching forfoo
findsfoo
&FOO
. Even with the-i
and-WiNS
. – slm Feb 22 '14 at 14:15ps
I get either no (command less
) options or-WNS
so I am quite sure this is not aps
problem hiding-i
/-I
.less
seems to have not even the possibility of a config file which could intervene here. – Hauke Laging Feb 22 '14 at 14:20-i
is supposed to do exactly that. The interesting question is: Does your less matchFOO
forfoo
without-i
? – Hauke Laging Feb 22 '14 at 14:21FOO
only matchesFOO
. Seems like a bug to me. – slm Feb 22 '14 at 14:24less
458; which is yours? – Hauke Laging Feb 22 '14 at 14:30less 458 (GNU regular expressions)
, searching forfoo
matchesfoo
and notFoo
orFOO
. Searching forFOO
matchesFOO
alone. If run with-i
,foo
matchesfoo
,Foo
andFOO
. Which version ofless
do you have? – terdon Feb 22 '14 at 14:31less 458 (POSIX regular expressions)
as well (Fedora 20 x86_64), and FOO will not match foo without-i
. What's your$LANG
? The C lib applies locale to determine upper/lower case differences. – goldilocks Feb 22 '14 at 14:34de_DE.UTF-8
. But calling asLC_ALL=C LANG= less file
doesn't make a difference. – Hauke Laging Feb 22 '14 at 14:47less
. – terdon Feb 22 '14 at 14:49foo
) only. – Hauke Laging Feb 22 '14 at 15:07