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

Tab completion messes up ..\ in partial path when no matches found #448

Closed
kahlkevin opened this issue Apr 3, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@kahlkevin
Copy link

kahlkevin commented Apr 3, 2023

Repro

  1. Using Clink v1.4.23.5fc3fc
  2. Have directory structure:
.
├── foo
│   └── file1.txt
└── bar
  1. Navigate to \bar
  2. Enter notepad ..\foo\z and press Tab to initiate file name completion

Result

You'll end up with notepad .\foo\z (notice missing .) with cursor positioned just after the first dot.

Expect

Cursor flash/bell since no matches found, but also no modification of the in-progress command line and no cursor reposition.

@chrisant996 chrisant996 added the bug Something isn't working label Apr 3, 2023
@chrisant996
Copy link
Owner

Confirmed. What a strange one. Thanks for reporting it. I'll investigate and fix.

@chrisant996
Copy link
Owner

It's due to the path disambiguation algorithm, combined with a quirk in how the FindFirstFile() API behaves with a search pattern that begins with . (which drops into some compatibility logic for DOS).

@kahlkevin You can work around it by running clink set match.expand_abbrev false to turn off the path disambiguation feature.

@chrisant996
Copy link
Owner

The fix will appear in the next release (v1.4.24).

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
-