Bash 4中有新的选项:checkjobs和autocd。
但是,我没有在

man bash

我跑不成功
{checkjobs,autocd}

我在发行说明中发现了以下内容
 There is a new `checkjobs` option that causes the shell to check for and
 report any running or stopped jobs at exit


There is a new `autocd` option that, when enabled, causes bash to attempt
to `cd` to a directory name that is supplied as the first word of a
simple command.

如何使用autocd和checkjobs?

最佳答案

autocdcheckjobs不是命令,而是选项。
可以使用shopt built-in设置它们。
例子:

shopt -s autocd


shopt -s checkjobs


shopt -s autocd checkjobs

两个都设定。

08-17 12:00