[英]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.