Faz*_*ton 27
当未指定其他寻呼机时,man用于less显示手册页。
涉及更改寻呼机命令行的其他答案是正确的,但您也可以-i在 less 运行时键入。从较少的手册页:
-后跟命令行选项字母之一(请参阅下面的选项),这将更改该选项的设置并打印一条描述新设置的消息。
因此-i,在 less 中键入while 更改设置的方式与在命令行中指定它的方式相同。我从How do you do a pattern modifier using less得到提示,这将起作用,然后在手册页中找到了解释。
ter*_*don 13
仅当您使用大写字母时,而不是仅使用小写字母时。例如,运行man bash并尝试:
/invoc <== 不区分大小写/Invoc <== 区分大小写/INVOC <== 区分大小写正如@manatwork 在评论中指出的那样,您还可以通过添加export MANPAGER='less -I'到您的~/.profile. 该MANPAGER变量定义了与man命令一起使用的程序。的-I装置(从man less):
-I or --IGNORE-CASE
Like -i, but searches ignore case even if the pattern contains
uppercase letters.
Run Code Online (Sandbox Code Playgroud)
其他相关选项是(默认情况下通常启用此选项):
-i or --ignore-case
Causes searches to ignore case; that is, uppercase and lowercase
are considered identical. This option is ignored if any upper?
case letters appear in the search pattern; in other words, if a
pattern contains uppercase letters, then that search does not
ignore case.
Run Code Online (Sandbox Code Playgroud)
所以,如果你export MANPAGER="less -I"; man bash,你应该能够以/iNvOc不区分大小写的方式进行搜索。