小编Bri*_*ola的帖子

使用“--git-dir=... --work-tree=...”完成 Zsh git 文件名:不是 git 存储库

我使用这种方法跟踪我的点文件:

  • 一个裸存储库驻留在$HOME/repos/dotfiles.
  • 我所有的点文件都驻留在它们的正常位置,例如$HOME/.vim/vimrc,不是$HOME/repos/dotfiles/vimrc.
  • 我跑来git --git-dir=$HOME/repos/dotfiles --work-tree=$HOME ...管理事情。

(实际上,我有一个函数g()可以在我进入时扩展为上述命令$HOMEgit否则扩展为。)

一切都很好,除了...

问题: Zsh git 文件名补全不起作用。

例子:

% pwd
/home/brian
% g status                                                                                                                                         ~
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   .vim/vimrc
        modified:   .xmonad/xmonad.hs

no changes added to commit (use …
Run Code Online (Sandbox Code Playgroud)

zsh git autocomplete

12
推荐指数
1
解决办法
1075
查看次数

标签 统计

autocomplete ×1

git ×1

zsh ×1