Skip to content

fix: accurately locate the suggestion in auto-complete #650

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

Closed
wants to merge 2 commits into from

Conversation

divanshu-go
Copy link

@divanshu-go divanshu-go commented Apr 10, 2025

/claim #420

before

image

after

image

@tusharmath I did a PR upstream to solve this issue nushell/reedline#903
You can either wait for them to merge or fork the repo (and then I will do a PR in that fork to resolve this issue)

@CLAassistant
Copy link

CLAassistant commented Apr 10, 2025

CLA assistant check
All committers have signed the CLA.

@tusharmath
Copy link
Collaborator

Fantastic! Let's wait for the PR to get merged.

@tusharmath
Copy link
Collaborator

How about we create our own CompletionMenu and use that instead of the default one? This way we won't need to wait for the PR to be merged in nushell.

@divanshu-go
Copy link
Author

divanshu-go commented Apr 10, 2025

How about we create our own CompletionMenu and use that instead of the default one? This way we won't need to wait for the PR to be merged in nushell.

@tusharmath I suggest that Instead you just fork the repo reedline and I do a PR on that fork
and then use that fork in Cargo.toml

@tusharmath
Copy link
Collaborator

Hmm in that case it would be better to maintain just the completion menu. Keeping a fork up to date is quite a painful process.

Signed-off-by: divanshu-go <divanshugrover2009@gmail.com>
@divanshu-go
Copy link
Author

@tusharmath The Upstream has merged my PR nushell/reedline#903

@divanshu-go
Copy link
Author

divanshu-go commented Apr 15, 2025

@tusharmath I have updated the Cargo.toml to use that specific commit from https://github.com/nushell/reedline.git

image

@divanshu-go
Copy link
Author

@tusharmath are there any changes required for this PR ?

@laststylebender14
Copy link
Contributor

@divanshu-go it should highlight the file name only.

Screenshot 2025-04-15 at 4 41 25 PM

@divanshu-go
Copy link
Author

divanshu-go commented Apr 15, 2025

@laststylebender14 this is due to find() being used instead of rfind()

the maintainer at reedline insisted on using it for some reason , nushell/reedline#903 (comment)

@divanshu-go
Copy link
Author

@laststylebender14
image

I have did a PR there to solve the problem nushell/reedline#905

@tusharmath
Copy link
Collaborator

The search is based on file name, hence selection on the file name would make more sense.

@tusharmath tusharmath marked this pull request as draft April 15, 2025 13:41
@divanshu-go
Copy link
Author

@tusharmath I have did a PR nushell/reedline#905
to solve the problem #650 (comment)

@tusharmath
Copy link
Collaborator

@divanshu-go Let me know if you are planning to implement a custom CompletionMenu so that we can format it as per our needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants