Closed rpdelaney closed 4 years ago
I can get this effect in my terminal with tput sitm
and end with tput ritm
.
There's also a dim effect with (appropriately) tput dim
.
hi @rpdelaney ,
this is a feature request for termcolor. If the feature request lands there, I will be happy to support a new attribute.
I may give it a try but don't hold your breath.
Third time's a charm.
It does look like crossterm supports more of these offbeat styles.
Would there be any way to allow a user to define their own pass-through values? Something like (just brainstorming here):
diffr --colors removed:background:124 \
--rawcolors refine-removed:background:"$(tput setaf 124)":foreground:"$(tput dim ; tput setaf 15)"
Nah that won't work, the shell will evaluate it before passing it to diffr. Maybe env vars would be better?
DIFFR_REFINE_REMOVED_BG="$(tput setaf 124)"
DIFFR_REFINE_REMOVED_FG="$(tput dim ; tput setaf 15)"
Nah that won't work, the shell will evaluate it before passing it to diffr. Maybe env vars would be better?
DIFFR_REFINE_REMOVED_BG="$(tput setaf 124)" DIFFR_REFINE_REMOVED_FG="$(tput dim ; tput setaf 15)"
I would really avoid such solutions for the following reasons:
So progress on this will pass by improvements in diffr's dependencies.
Fair enough. Thank you for filing the PR upstream. I'll follow that and leave it to you when to close this issue. Thanks! This is a neat tool.
Thank you for running this down so diligently! Love this tool :)
I plan another trick in my bag for arbitrary ANSI escape code; stay tuned ;)
Any chance there will be a release soon? I'm turning some of my colleagues on to using this with some styles I worked out for diffing terraform (since terraform-fmt
constantly makes whitespace changes for alignment) but the releases in homebrew / AUR do not have all the features in the tip.
@rpdelaney done!
Not all terminals support italics, but the one I use does! I think it could make some intuitive styles for refined text.