summaryrefslogtreecommitdiffstats
path: root/.zfunc/_dotfiles
blob: 55ca15ac3ebf4c2f694d3a4fea5ed0e5d3464298 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#compdef dotfiles

_dotfiles() {
    # 1. Define your paths relative to HOME
    # The :a modifier turns it into an absolute path for Git's internals
    local -x GIT_DIR="${HOME}/.dotfiles"
    local -x GIT_WORKTREE="${HOME}"

    # 2. Prepare the command line for the real 'git' completion
    # We replace 'gwrap' (the first word) with 'git'
    words[1]=git
    
    # 3. Tell Zsh to use the official git completion logic
    service=git
    _git
}

_dotfiles "$@"