Description
Current Behavior
I am using yadm to manage my dotfiles. What it basically does is run git init --bare /Users/foo/.local/share/yadm/repo.git
and provide a cli tool yadm
that has few own commands. Other commands (e.g. yadm add
or yadm status
) are directly passed through to git
(https://github.com/yadm-dev/yadm/blob/bbb58e6625de5d934fd49b4b81c1981e137e3057/yadm#L151).
As carapace does not provide a builtin completer for yadm
i tried creating my own spec:
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
name: yadm
run: "[git, --git-dir, /Users/foo/.local/share/yadm/repo.git]"
This works fine for basic stuff. yadm stat<tab>
becomes yadm status
, nice!
The problem is that yadm add <tab>
prints could not find parent directory containing any of: ".git"
. However when i am inside a git-repo (e.g. my work repo which has nothing to do with my dotfiles) yadm add <tab>
seems to work fine and correctly shows unstaged files in my dotfiles.
Calling the completer directy (atleast that's what i assume it does) with carapace git nushell "git" "--git-dir" "/Users/foo/.local/share/yadm/repo.git" "add" ""
yields the same error.
Version
$ carapace --version
carapace-bin 1.3.0
OS
- Darwin
- Linux
- Termux
- Windows
Shell
- Bash
- Elvish
- Fish
- Nushell
- Oil
- Powershell
- Xonsh
- Zsh
Anything else?
I did some digging myself and here is the stacktrace i suspect: