[英]Git tab completion stopped working on remote branches
我已将 git 更新到其最新版本 (2.29.0) 并使用 ZSH 5.8。
我曾经使用git checkout remote_br<tab>
在分支之间切换,以在分支之间快速切换,即使该分支只是远程一个 atm。 我见过的git已经取得了很多关于开关/结账的变化最近,事情是我对远程分支机构的自动完成不工作了(与结账或交换机)。
我已经尝试将最新版本的contrib/completion/git-completion.zsh
到我的 zsh 中,但我仍然有我的问题。 我在这里错过了什么吗?
在过去的几个小时里,我一直在研究这个问题,并确定了回归。
回归发生在6880779 。
要暂时解决此问题:将您的git-completion.bash
文件(我的位于/usr/local/share/zsh/site-functions/git-completion.bash
)替换为https://github.com/git/git/blob /688077910bdfbd502cb59c9c48a2af2c97d8b67b~1/contrib/completion/git-completion.bash
要真正解决这个问题,请为我的 git PR投票并帮助合并它! ( https://github.com/git/git/pull/902 )
试试下面的补丁:
--- a/git-completion.zsh
+++ b/git-completion.zsh
@@ -97,6 +97,11 @@ __gitcomp_direct ()
compadd -Q -S '' -- ${(f)1} && _ret=0
}
+__gitcomp_direct_append ()
+{
+ __gitcomp_direct "$@"
+}
+
__gitcomp_nl ()
{
emulate -L zsh
一般来说,最好向git 邮件列表报告错误,但是,我是 zsh 代码的维护者,它在我的 fork 中是最新的: git-completion 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.