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

search: print package name once with NO_COLOR #996

Merged
merged 1 commit into from
Jun 11, 2022
Merged

Conversation

AladW
Copy link
Member

@AladW AladW commented May 24, 2022

Issue #995

Alternative: always print the hyperlink, even with NO_COLOR=1. The hyperlink function is then reduced to:

hyperlink() {
    local OSC8="\e]8" ST="\e\\"
    printf "$OSC8;;%s$ST%s$OSC8;;$ST" "$1" "$2"
}

@AladW AladW added this to the 10 milestone May 24, 2022
@Earnestly
Copy link
Contributor

There's really not much point in using variables here

@AladW
Copy link
Member Author

AladW commented Jun 11, 2022

Maybe not, but at least in the alternative example it identifies the escape sequences.

Previously, when ALL_OFF is undefined (i.e. colorize() is not run
because NO_COLOR is set), the package name was printed a second time.

Print the link unconditionally; NO_COLOR is about color escapes only.
@AladW AladW merged commit c7e6c3f into master Jun 11, 2022
@AladW AladW deleted the search-osc8-fix branch June 11, 2022 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants