carapace-bin
carapace-bin copied to clipboard
git: Filename completion with directory symlinks
Current Behavior
When there's a symlink anywhere in the directory hierarchy to the current directory, filename completion will create a relative path to the symlink target, effectively breaking filename completion.
Expected Behavior
Completion should work for the current directory regardless of whether there's a symlink anywhere in the directory hierarchy.
Steps To Reproduce
With the default config:
mkdir /tmp/a
ln -s /tmp/a /tmp/b
cd /tmp/b
git clone <some repo> test
cd test
touch some_file
git add som<Tab> # will not offer completion
git add <Tab> # will complete to ../../a/test/some_file
Version
1.0.1
OS
- [X] Linux
- [ ] OSX
- [ ] Windows
Shell
- [ ] Bash
- [ ] Elvish
- [ ] Fish
- [ ] Nushell
- [ ] Oil
- [ ] Powershell
- [ ] Xonsh
- [X] Zsh
Anything else?
No response
I can imagine that there's still something amiss with symlinks.
But following the given example it does complete some_file
for me for both cases.
Thanks for the feedback, maybe it's something in my configuration / environment that's the issue, I'll try to see if I can identify it.
One thing to note is that git add <file>
is different from standard file completion and only completes relevant files.