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

Use chaining for AnsiGenericString::hyperlink #48

Merged
merged 1 commit into from
Jul 22, 2023

Commits on Jul 10, 2023

  1. Use chaining for AnsiGenericString::hyperlink

    The API for modifying a string to contain a hyperlink used in nushell#47
    behaves different than most of our `Style`-driven APIs that basically
    all work through method chaining.
    
    As an alternative I propose we change the signature to take the
    `AnsiGenericString` by value and modify it in place. This feels more
    expressive for quickly building out a styled string with a link.
    One downside compared to a modifying setter API is that it takes a
    more tokens to do conditional modification with an `if` expression.
    sholderbach committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    e6c7551 View commit details
    Browse the repository at this point in the history