Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RemoveSHELLOPTS=vi and-Xjline support; reinstate-Xnojline#10716

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SethTisue merged 1 commit intoscala:2.13.xfromhvesalai:2.13.x
Apr 8, 2024

Conversation

@hvesalai
Copy link
Contributor

This functionality is better provided byjline through the~/.inputrc or other file pointed to by-Djline.inputrc

The content of the file needs to just include the line

set editing-mode vi # alternatively emacs

The current implementation doesn't check whether the terminal can supportvi oremacs modes, and hence it causes problems to, for example, emacs users running the REPL in comint buffer

@scala-jenkinsscala-jenkins added this to the2.13.15 milestoneMar 15, 2024
@SethTisue
Copy link
Member

@lrytz@som-snytt wdyt? I've tentatively milestoned it for 2.13.14.

if there is past history around this particular piece of code, I don't remember it. It came in in the big 2.13.12 JLine PR by Som (#8036)

@SethTisueSethTisue added the release-notesworth highlighting in next release notes labelMar 15, 2024
@SethTisueSethTisue modified the milestones:2.13.15,2.13.14Mar 15, 2024
@SethTisue
Copy link
Member

@ckipp01 are you a good person to ask about the vi side of this...?

@ckipp01
Copy link
Member

@ckipp01 are you a good person to ask about the vi side of this...?

meh, not really as I really don't use the REPL often. The reasoning here seems to make sense though.

@som-snytt
Copy link
Contributor

som-snytt commentedMar 15, 2024
edited
Loading

I'm agnostic onSHELLOPTS but why remove support for

  -Xjline:<mode>                   Select JLine mode. Default: `emacs`, `help` to list choices.

drudgery of "run it again with this other option"...

➜  ~ scala -Xjline:helpUsage: -Xjline:<mode> where <mode> choices are emacs, vi, off (default: emacs).  emacs  emacs key bindings.  vi     vi key bindings  off    No JLine editing.

I see that works and is the reason I haven't had vi bindings in a while.

My "to do" list from Feb 20 says "learn more about using jline more effectively." Oh, that was Feb 20, 2016.

Edit: there is a PR about "where to put REPL files" and previous ticket(s) about "provide .rc or .inputrc support". It would be more of a clear win if there were a "private" .inputrc in the REPL-specific directory. Without knowing much about it, I'm wary of the global config problem.

Edit: I see the linked PR (which was finally merged at pandemic lockdown) links to the .inputrc support which was merged a year later. So maybe indeed just remove all the options.-D is my least favorite way of supplying config, however.

@hvesalai
Copy link
ContributorAuthor

Good catch on the -Xjline. I'll review how it has been implemented.

I would remove even that since there is no point in having scala-specific way of configuring JLine.

Using the.inputrc is supported also by sbt.

I think the input mode should be personal and thus there is no reason to make it project-specific. It should be user specific and thus~/.inputrc is the correct place to define it.

@hvesalai
Copy link
ContributorAuthor

While we could return back the-Jline it should not have a default value. If not defined, it would not change the way JLine defines its keymapping.

Note that-Jline:off is not the solution for emacs users since it turns jline completely off. This means that also wanted features, such as history, are turned off.

If@som-snytt you think that the-Jline option is needed for some reason, I can rework my PR to support it (with no default instead of havingemacs as the default), but personally I think it should be completely removed for the reasons I've discussed above.

This functionality is better provided by jline through the `~/.inputrc` or other file pointed to by `-Djline.inputrc`The content of the file needs to just include the line```set editing-mode vi # or emacs```
@hvesalaihvesalai changed the titleRemove SHELLOPTS=vi supportRemove SHELLOPTS=vi and -Xjline support, reinstate -XnojlineMar 15, 2024
@hvesalai
Copy link
ContributorAuthor

Pushed a new version with-Jline deprecated and-Jnoline reinstated (although I don't know who would need it)

Copy link
Contributor

@som-snyttsom-snytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Approving on assumption that using standard underlying mechanism is preferable.

@SethTisueSethTisue added the prio:hihigh priority (used only by core team, only near release time) labelMar 21, 2024
@SethTisueSethTisue removed the prio:hihigh priority (used only by core team, only near release time) labelApr 8, 2024
@SethTisueSethTisue merged commit1776aec intoscala:2.13.xApr 8, 2024
@SethTisueSethTisue changed the titleRemove SHELLOPTS=vi and -Xjline support, reinstate -XnojlineRemoveSHELLOPTS=vi and-Xjline support; reinstate-XnojlineApr 19, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@som-snyttsom-snyttsom-snytt approved these changes

Assignees

No one assigned

Labels

release-notesworth highlighting in next release notes

Projects

None yet

Milestone

2.13.14

Development

Successfully merging this pull request may close these issues.

5 participants

@hvesalai@SethTisue@ckipp01@som-snytt@scala-jenkins

[8]ページ先頭

©2009-2025 Movatter.jp