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

hyperlink truncated at end of row isn't closed correctly #150

Open
mcwarman opened this issue Feb 26, 2024 · 2 comments
Open

hyperlink truncated at end of row isn't closed correctly #150

mcwarman opened this issue Feb 26, 2024 · 2 comments

Comments

@mcwarman
Copy link

mcwarman commented Feb 26, 2024

When using a template with a hyperlink at the end, if the the line is truncated the link its closed correctly.

gh api notifications --template '{{tablerow "Reason" "When" "Repo" "Title" -}}
{{ range . -}}
{{tablerow (.reason | autocolor "cyan") (timeago .updated_at) (.repository.full_name) (hyperlink "https://github.com/notifications" (.subject.title | autocolor "yellow")) -}}
{{end -}}'

Below output is from redirecting to a file, and using sed -n l0 file

With a the available space in terminal window the link is closed correctly:

\033]8;;https://github.com/notifications\033\\build(deps): bump pre-commit helm-docs to v1.13.0\033]8;;\033\\$

When the terminal is too small, the link isn't closed

\033]8;;https://github.com/notifications\033\\build(deps):...$

Therefore turning everything after that in terminal too a link, running the following clears it printf '\e]8;;'

@mcwarman
Copy link
Author

It also looks like if you have hyperlink not at the end, it breaks all the column formatting, I'm assuming this is because the URL chars are used calculation, but then are not displayed.

@mcwarman
Copy link
Author

Probably related to this: muesli/reflow#45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant