Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git: Filename completion with directory symlinks #2359

Open
2 of 11 tasks
saviola777 opened this issue Apr 25, 2024 · 3 comments
Open
2 of 11 tasks

git: Filename completion with directory symlinks #2359

saviola777 opened this issue Apr 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@saviola777
Copy link

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

  • Linux
  • OSX
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

No response

@saviola777 saviola777 added the bug Something isn't working label Apr 25, 2024
@rsteube
Copy link
Member

rsteube commented Apr 25, 2024

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.

@saviola777
Copy link
Author

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.

@rsteube
Copy link
Member

rsteube commented Apr 25, 2024

One thing to note is that git add <file> is different from standard file completion and only completes relevant files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants