无法拥有 MacPorts' Zsh 中的制表符补全

发布于 2024-07-18 11:13:47 字数 596 浏览 8 评论 0原文

我在包含 MacPorts 的 Bash 选项卡时得到以下内容完成 到 Zsh

/opt/local/etc/bash_completion:[:48: unrecognized condition: `2'
[ -- cut -- ]
/opt/local/etc/bash_completion:[:62: unrecognized condition: `2'
/opt/local/etc/bash_completion:69: command not found: shopt
[ -- cut -- ]
/opt/local/etc/bash_completion:3015: command not found: complete
/opt/local/etc/bash_completion:3062: parse error near `&&'

如何在 Zsh 中实现 MacPorts 的 Tab 完成功能?

I get the following in including MacPorts' Bash tab completion to Zsh

/opt/local/etc/bash_completion:[:48: unrecognized condition: `2'
[ -- cut -- ]
/opt/local/etc/bash_completion:[:62: unrecognized condition: `2'
/opt/local/etc/bash_completion:69: command not found: shopt
[ -- cut -- ]
/opt/local/etc/bash_completion:3015: command not found: complete
/opt/local/etc/bash_completion:3062: parse error near `&&'

How can you have MacPorts' tab completion in Zsh?

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

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

发布评论

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

评论(2

-黛色若梦 2024-07-25 11:13:47

您可能想尝试使用 zsh 的 zsh 补全。 令人惊讶的是,bash_completion 适用于 Bash。

编辑 听起来您可能正在专门寻找对 port 命令的完成支持。 看起来 MacPorts zsh 包有一个 +mp_completion 变体,它将安装 port 命令的完成:

sudo port install zsh +mp_completion

You might want to try zsh completion for zsh. bash_completion is for Bash, surprisingly enough.

edit It sounds like you might be looking specifically for completion support for the port command. It looks like the MacPorts zsh package has a +mp_completion variant that will install completion for the port command:

sudo port install zsh +mp_completion
离笑几人歌 2024-07-25 11:13:47

唤醒那个老问题,我刚刚发现做了一些研究,提到了精彩的 oh-my-zsh 适用于 OSX 的实用程序,可以轻松地将制表符完成移植到其他功能以及许多其他好东西中。 恕我直言,必须有:)

Waking up that old question I just found doing some researchs to mention the wonderful oh-my-zsh utility intended for OSX that brings easily tab completion to port amongst others and also many many other nice stuff. A must have imho :)

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