Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Zsh git filename completion with “--git-dir=… --work-tree=…”: not a git repository



Hello,

I'm using git bare repo and two aliases to manage my dotfile:

% grep dof .config/zsh/aliases
alias dofenv='GIT_DIR=$HOME/.dotfiles/ GIT_WORK_TREE=$HOME'
alias dof='dofenv git'

With the above, completion works for some git commands but not all:

dof sta [tab]
dof status

dof ad [tab]
dof add [tab]
---- not a git repository

zsh --version
zsh 5.3.1 (x86_64-unknown-linux-gnu)

How can I fix that?

T.


Messages sorted by: Reverse Date, Date, Thread, Author