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

REPL: fix hinting without expanding user #54311

Merged
merged 1 commit into from
May 6, 2024

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Apr 30, 2024

Fixes #53884

Hints will show without expanding ~, then a tab will complete the shown hint, then a second tab on the resulting valid path expands ~. I think it makes sense?

Screen.Recording.2024-04-29.at.9.54.40.PM.mov

@IanButterworth IanButterworth added stdlib:REPL Julia's REPL (Read Eval Print Loop) backport 1.11 Change should be backported to release-1.11 labels Apr 30, 2024
@tecosaur
Copy link
Contributor

This looks like a nice change to me 😃

@IanButterworth IanButterworth force-pushed the ib/hint_expanduser branch 3 times, most recently from 6eaed21 to f83b552 Compare April 30, 2024 17:54
@IanButterworth
Copy link
Sponsor Member Author

IanButterworth commented Apr 30, 2024

This is going to require adding the hint kw to Pkg's complete_line. It makes me wonder whether there's a nonbreaking way to inform the system that we're generating a hint (so that different behavior might be given)

JuliaLang/Pkg.jl#3886

@IanButterworth
Copy link
Sponsor Member Author

I found a little weird behavior but it exists before this PR.

GitHub is the only path completion available, yet it doesn't show as a hint until there are 2 chars.

Screenshot 2024-05-06 at 1 00 39 PM
Screenshot 2024-05-06 at 1 00 46 PM
Screenshot 2024-05-06 at 1 02 12 PM

That can be for another PR

@IanButterworth IanButterworth merged commit 1221160 into JuliaLang:master May 6, 2024
7 checks passed
@IanButterworth IanButterworth deleted the ib/hint_expanduser branch May 6, 2024 17:03
KristofferC pushed a commit that referenced this pull request May 20, 2024
Fixes #53884

Hints will show without expanding `~`, then a tab will complete the
shown hint, then a second tab on the resulting valid path expands `~`. I
think it makes sense?

https://github.com/JuliaLang/julia/assets/1694067/05a4fa97-2a85-4f90-8591-162256cf0704
(cherry picked from commit 1221160)
KristofferC pushed a commit that referenced this pull request May 23, 2024
Fixes #53884

Hints will show without expanding `~`, then a tab will complete the
shown hint, then a second tab on the resulting valid path expands `~`. I
think it makes sense?

https://github.com/JuliaLang/julia/assets/1694067/05a4fa97-2a85-4f90-8591-162256cf0704
(cherry picked from commit 1221160)
@KristofferC KristofferC removed the backport 1.11 Change should be backported to release-1.11 label May 28, 2024
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
Fixes JuliaLang#53884

Hints will show without expanding `~`, then a tab will complete the
shown hint, then a second tab on the resulting valid path expands `~`. I
think it makes sense?



https://github.com/JuliaLang/julia/assets/1694067/05a4fa97-2a85-4f90-8591-162256cf0704
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib:REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REPL: path completion hints shouldn't expand ~ to user dir
3 participants