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

R console prompt configuration #2086

Open
EmilHvitfeldt opened this issue Jan 18, 2024 · 2 comments
Open

R console prompt configuration #2086

EmilHvitfeldt opened this issue Jan 18, 2024 · 2 comments
Labels
area: console Issues related to Console category.

Comments

@EmilHvitfeldt
Copy link

Positron Version:

Steps to reproduce the issue:

I used to use https://github.com/gaborcsardi/prompt in RStudio to great success. In Positron this doesn't work well 😅

  1. run prompt::set_prompt(prompt::prompt_fancy)
Kapture.2024-01-18.at.14.47.45.mp4

What did you expect to happen?

I'm not the only user of {prompt}, but current results are unusable.

This configuration is generally set in . Rprofile, so a new positron user might see this when they first boot up.

Were there any error messages in the output or Developer Tools console?

Nope

@EmilHvitfeldt
Copy link
Author

I don't know where this should be fixed. here or in the package. But I feel that

a. getting the current output is bad
b. people should be able to modify their console prompt

@DavisVaughan
Copy link
Contributor

Screenshot 2024-01-19 at 10 12 34 AM

It looks like simple ones like prompt_git() work, but fancier ones with Unicode like prompt_fancy() don't.

My guess is that the special prompt field we have in the Console is not getting treated as if it could have Unicode in it, making this a question for @softwarenerd.

@softwarenerd you can reproduce this with:

# First install this R package
pak::pak("gaborcsardi/prompt")

Then run:

prompt::set_prompt(prompt::prompt_fancy)

Hit Enter afterwards to ensure the prompt is updated, and it should look like the image above.

If you are in a git repo, you can also try

prompt::set_prompt(prompt::prompt_git)

that should work, and should show you the branch name as a simple character string (no unicode)

@petetronic petetronic added this to the Release Candidate milestone Feb 26, 2024
@wesm wesm added the area: console Issues related to Console category. label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: console Issues related to Console category.
Projects
None yet
Development

No branches or pull requests

4 participants