Skip to content

Syntax error should highlight last non-whitespace char in prompt str - not just ">" #127

Description

When I'm running as admin my prompt string is "{hist-num}# ". It would be nice if PSReadline would change the "#" to red when my command line has a syntax error. Perhaps this is something that is configurable via an option - ErrorSyntaxPromptChar?

Activity

  1. lzybkr commented on Jun 23, 2014

    @lzybkr
    Contributor

    I don't think we need an option. The current implementation uses char.IsSymbol and that covers at least 2 commonly used characters in prompts, but not all of them. I'll probably just change it to !char.IsWhiteSpace(c) && !char.IsLetterOrDigit(c).

  2. rkeithhill commented on Jun 23, 2014

    @rkeithhill
    ContributorAuthor

    Works for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions