无法在 Bash 4 中使用 Checkjobs 和 Autocd

发布于 2024-07-17 23:08:47 字数 576 浏览 5 评论 0原文

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.

How can you use autocd and checkjobs?

There are new options in Bash 4: checkjobs and autocd.
However, I did not find documentation for them at

man bash

I run unsuccessfully

{checkjobs,autocd}

I found the following in release notes

 There is a new `checkjobs` option that causes the shell to check for and
 report any running or stopped jobs at exit

and

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.

How can you use autocd and checkjobs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花桑 2024-07-24 23:08:47

autocdcheckjobs 不是命令,而是选项。

可以使用 shopt内置

示例:

shopt -s autocd

shopt -s checkjobs

shopt -s autocd checkjobs

设置两者。

autocd and checkjobs are not commands, but rather, they are options.

They can be set by using the shopt built-in.

Example:

shopt -s autocd

and

shopt -s checkjobs

or

shopt -s autocd checkjobs

to set both.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文