Skip to content

Topic/repl customization#4447

Closed
iracic wants to merge 1 commit intoscala:2.11.xfrom
iracic:topic/repl-customization
Closed

Topic/repl customization#4447
iracic wants to merge 1 commit intoscala:2.11.xfrom
iracic:topic/repl-customization

Conversation

@iracic
Copy link

@iracic iracic commented Apr 13, 2015

Few low hanging fruit changes to customize scala REPL.
Please, let me know if anything should be improved.

@scala-jenkins scala-jenkins added this to the 2.11.7 milestone Apr 13, 2015
@adriaanm
Copy link
Contributor

Welcome & thank you, @iracic! Please sign the Scala CLA.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this break existing customizers? I don't think we can afford to do that, sorry.

Copy link
Author

Choose a reason for hiding this comment

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

You are right, I was too fast here.
I propose to keep this one and also try to change namespace as "scala.shell." on other properties in the same way.
I will rework/rename these and try again (should I go with new PR) ?

Copy link
Author

Choose a reason for hiding this comment

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

I have created another branch topic/repl-customization--2nd-try.
Let me know your opinion about it.
Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, please push --force to the same branch so that this PR is updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe with squash?

Copy link
Author

Choose a reason for hiding this comment

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

Ok, will do forced push.
Adriaan, do you prefer to squash to one change ?

@iracic iracic force-pushed the topic/repl-customization branch from f99e1be to 5a1e437 Compare April 14, 2015 11:15
@adriaanm
Copy link
Contributor

Yes, please squash to one commit, and take a look at the guidelines around formatting your commit message (short title that can be included in release notes, description in body, reference to jira ticket if any,...). Here's a rough suggestion for the title: "Configurable REPL: prompt, verbosity, history path".

@iracic iracic force-pushed the topic/repl-customization branch from 5a1e437 to b31281e Compare April 15, 2015 08:06
@iracic
Copy link
Author

iracic commented Apr 15, 2015

Squashed. Thank you.

@soc
Copy link
Contributor

soc commented Apr 15, 2015

There are also various places where the change introduced odd formatting, this should be fixed, too.

@som-snytt
Copy link
Contributor

I think my previous comments about formatting and using ReplProps are still relevant.

In anticipation, I have prepared a StackOverflow answer to "How do I set the history file for REPL?"

@iracic iracic force-pushed the topic/repl-customization branch from b31281e to 7c5bddf Compare April 16, 2015 14:12
@iracic
Copy link
Author

iracic commented Apr 16, 2015

Tried to reformat code and put properties in ReplProps

@iracic
Copy link
Author

iracic commented Apr 17, 2015

Above failure seem like infrastructure errors. I do not find link between them and code changes...

@mpociecha
Copy link
Contributor

You're right, it's not related to your changes. We're looking at these problems.

@iracic
Copy link
Author

iracic commented Apr 17, 2015

@mpociecha Thank you

@mpociecha
Copy link
Contributor

@iracic Simply I'm a culprit.

@iracic
Copy link
Author

iracic commented Apr 17, 2015

@mpociecha Shame on you :-)

Copy link
Member

Choose a reason for hiding this comment

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

prompt2 should be renamed to something more descriptive

Copy link
Author

Choose a reason for hiding this comment

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

I thought that "suffix" 2 make sense (similar to PS2 in Unix shell)
Let me know what do you propose ?

@adriaanm adriaanm added the welcome hello new contributor! label May 26, 2015
@SethTisue SethTisue modified the milestones: 2.11.8, 2.11.7 Jun 17, 2015
adriaanm referenced this pull request in som-snytt/scala Jun 22, 2015
The scala shell prompt can be provided as either a system
property or in compiler.properties.

The prompt string is taken as a format string with one
argument that is the version string.

```
$ scala -Dscala.repl.prompt="%nScala %s> "
Welcome to Scala version 2.11.7-20150616-093756-43a56fb5a1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions to have them evaluated.
Type :help for more information.

Scala 2.11.7-20150616-093756-43a56fb5a1> 42
res0: Int = 42

Scala 2.11.7-20150616-093756-43a56fb5a1> :quit
```
@SethTisue
Copy link
Member

superseded by #4576

@SethTisue SethTisue closed this Jun 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

welcome hello new contributor!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants