alecthomas / alecthomas/kingpin

You cannot eval completion scripts for multiple binaries.

未关闭
#203 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
3.6k
派生
279
PR 合并指标
30 天内没有已合并 PR

描述

When you try to eval two different completion scripts for two different binaries only the last one is working correctly.

e.g.
Evalutuating the folowing code will result in completion working properly only for the binary2
```
eval "$(binary1 --completion-script-zsh)"
eval "$(binary2 --completion-script-zsh)"
```

The issue seems to be caused by running `compinit` again, which resets completion module and removes previously added autocompletion scripts.

I propose to remove calls to `compinit` and `bashcompinit` and leave this responsibility to the user.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。