在 cd 中,bash 帮助页面:
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (/), then CDPATH is not used.
Run Code Online (Sandbox Code Playgroud)
但是我不理解“替代目录”的概念,并且找不到说明冒号 ( :
) 与cd
命令一起使用的示例。
在浏览 Linux 手册页时,有时您需要查询手册页中诸如-p
或 之类的标志的含义。-al
手册页的默认文本阅读器较少,我尝试使用 / 搜索来查找公共标志列表定义中的第一个匹配项:
/^-p
Run Code Online (Sandbox Code Playgroud)
但Pattern not found
发生了却不起作用。
这个技巧在 vim 中工作时有效,但在阅读手册页时不适用于 less。
有没有办法实现这个要求呢?