question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Would you consider supporting PowerLine-like custom prompts?

See original GitHub issue

I’m a big fan of Oh My Posh custom prompts and have customized my PSRL PromptText and ContinuationPromptText options like so:

Set-PSReadLineOption -ContinuationPrompt "`e[48;2;88;88;88m `e[0m`e[38;2;88;88;88m$([char]0xE0B0)`e[0m "
Set-PSReadLineOption -PromptText "`e[38;2;88;88;88m$([char]0xE0B0)`e[0m "

Looks a bit barbarian but it gives me a nice prompt like this:

image

Description of the new feature/enhancement

The problem with customizing the PromptText option with ANSI escape sequences is that this prevents the default processing in RenderErrorPrompt behaviour to kick in. It would be awesome if PSRL would behave like this:

PowerShell 7 Preview 2020-11-29 18-13-41

Proposed technical implementation details (optional)

I would like to propose an additional option named ErrorPromptText that could be customized. If set to a particular value, it would take precedence over PromptText being rendered in red and would be written as is.

What do you think?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
daxian-dbwcommented, Feb 4, 2022

@mattcargile Sorry, obviously our PM team didn’t get the bandwidth to do this. I have added this issue to the “Features-for-Blogging” milestone to track it for the future blogging work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom prompt on product page
Yes I think that would be useful to allow users to modify the prompt. So probably I will add a new option to...
Read more >
Feature Request - Support custom prompts and their ...
Feature Request - Support custom prompts and their localization ... This becomes unwieldy as you add more locales to support. It would be...
Read more >
Best practices for Assist custom prompts
When these default options don't fit exactly what you are looking for, you can utilize custom prompts to tailor Assist to your specific...
Read more >
ProximityPrompts vs. Custom Interaction Mechanic
I 'm indecisive as to whether I should use proximity prompts or my custom interaction handler in a first-person game with both carriable...
Read more >
Starship with iTerm2 and the Snazzy theme
The minimal, blazing-fast, and infinitely customizable prompt for any shell! ... If you are interested in helping contribute to starship, please take a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found