-
Notifications
You must be signed in to change notification settings - Fork 393
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
FR: Allow specifying tail
for truncate_*
template functions
#5085
Labels
good first issue
Good for newcomers
polish🪒🐃
Make existing features more convenient and more consistent
Comments
fwiw, I would call the parameter as |
https://docs.rs/console/latest/console/fn.truncate_str.html calls it |
fill_char
for truncate_*
template functionstail
for truncate_*
template functions
3 tasks
steadmon
added a commit
to steadmon/jj
that referenced
this issue
Feb 4, 2025
If an ellipsis arg is given to the truncate_* template functions, append (or prepend) the ellipsis when the template content is truncated to fit the maximum width. Fixes jj-vcs#5085.
steadmon
added a commit
that referenced
this issue
Feb 4, 2025
If an ellipsis arg is given to the truncate_* template functions, append (or prepend) the ellipsis when the template content is truncated to fit the maximum width. Fixes #5085.
steadmon
added a commit
that referenced
this issue
Feb 4, 2025
If an ellipsis arg is given to the truncate_* template functions, append (or prepend) the ellipsis when the template content is truncated to fit the maximum width. Fixes #5085.
4 tasks
steadmon
added a commit
that referenced
this issue
Feb 5, 2025
If an ellipsis arg is given to the truncate_* template functions, append (or prepend) the ellipsis when the template content is truncated to fit the maximum width. Fixes #5085.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for newcomers
polish🪒🐃
Make existing features more convenient and more consistent
Describe the solution you'd like
This is a very minor nice-to-have, but would it be possible to add an optional
tail
to thetruncate_*
template functions, to indicate that truncation has occurred? Sometimes truncation occurs at a space character, and it's not obvious that there was a longer description available.Describe alternatives you've considered
Currently, it's possible to do something like:
(After #5072 is released, I can replace this workaround with a length check)
The text was updated successfully, but these errors were encountered: