delta icon indicating copy to clipboard operation
delta copied to clipboard

Switch from ansi-term to nu-ansi-term

Open jbicha opened this issue 4 weeks ago • 1 comments

ansi-term appears to be unmaintained. Let's switch to the popular maintained fork, nu-ansi-term.

It explicitly adds the "bright" colors and a "default" color. I didn't know how to handle the default color at all and I took a guess at the bright colors. The bright colors are named as Light variants of the existing colors except that DarkGrey is the bright version of black.

My goal was to help one of the last things packaged in Debian using ansi-term to use nu-ansi-term instead.

jbicha avatar Dec 03 '25 04:12 jbicha

I think some of the line breaks that cargo fmt wants aren't as useful for readability. Maybe we need to tweak the configuration or maybe you're happy with what it already recommends.

Feel free to fix this up however you want.

jbicha avatar Dec 04 '25 14:12 jbicha

Thank you.

I didn't know how to handle the default color at all and I took a guess at the bright colors.

Where did you have to handle those extra nu_ansi_term features? Most of the commit looks like straightforward search-and-replace.

Also, I'm thinking of internally re-exporting nu_ansi_term as crate::ansi::term in src/ansi/mod.rs to make the name a bit more brief, if you're ok with force-pushing that in your name. Maybe that also fixes the format issue - which file/line do mean?

th1000s avatar Dec 09 '25 05:12 th1000s

I force-pushed an alternate way of keeping the shorter ansi_term name.

jbicha avatar Dec 12 '25 13:12 jbicha