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

Customized R prompt not working in Rice #9

Closed
JackieMium opened this issue Sep 14, 2017 · 12 comments
Closed

Customized R prompt not working in Rice #9

JackieMium opened this issue Sep 14, 2017 · 12 comments

Comments

@JackieMium
Copy link

Nice little tool !
I have a line in my ~/.Rprofile:

options(prompt="\033[0;36mR>>\033[0m"

to customize the R prompt style and color. It worked in R console and in RStudio daily build(yes, stable build does not support this yet ), but Rice won't parse it.

Another thing is that when I type in Rice, the code completion pops up and I use UP-DOWN arrow key to navigate through all cadidate, but when I hit ENTER, the line will be submitted and ran, which is not good logci. In zsh or RStudio, where code completion is implemented, hitting ENTER will usually just input the code completion candidate you choose, not run it immediatly. This is annoying because when I am typing and using code completion, it usually means the line is not done yet. For example, when I input library(MA, MASS pops up and I navigate to it and hit ENTER, the line will run. However, a right braket is absent and the code definitely won't run properly.

@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

You are right that rice doesn't honor that option. Theoretically, rice should be able to support it.

For your second issue, which version of rice are you using? The latest version should not submit the code when enter is hit.

EDIT: Wait, the completion is still not working as expected.

@JackieMium
Copy link
Author

@randy3k I am using rice 0.0.12 under Debian sid x86_64, R version 3.4.1 (2017-06-30) -- "Single Candle"

randy3k added a commit that referenced this issue Sep 14, 2017
@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

The completion issue is fixed at the master branch, I thought I have fixed it but there was a bug.

@JackieMium
Copy link
Author

OK, waiting for a perfect solution.

@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

I am now working on the prompt.

@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

All fixed, pip install git+https://github.com/randy3k/rice will install the latest commit.

@randy3k randy3k reopened this Sep 14, 2017
@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

Oops, it was a false +ve

@JackieMium
Copy link
Author

I've got the dev version installed now. When ENTER is hitted, a new line is inserted(or, should I say the the input cursor goes to the next line?), is it supposed to be like this?

@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

It was the bug that I mentioned earlier, it should be fixed by 657e856.

The prompt issue was also addressed at 2064555

sep-14-2017 01-05-54

@randy3k randy3k closed this as completed Sep 14, 2017
@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

Did you force it to install?

pip install -I git+https://github.com/randy3k/rice

@JackieMium
Copy link
Author

Problem solved.
I guess the force to install option did the trick. Didn't know anything about that earlier, sorry.

@randy3k
Copy link
Owner

randy3k commented Sep 14, 2017

Glad that it also works for you.

v0.0.13 is released.

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

No branches or pull requests

2 participants