nu-ansi-term
Library for ANSI terminal colors and styles (bold, underline)
0.50.3
486M downloads/mo
#243 most downloaded on crates.io
nushell/nu-ansi-term
What this package is like to depend on
Last release 10 months ago
10 Oct 2025
Release timing varies
gaps range from 2 weeks to 1.2 years
Most releases are documented
notes for 17 of 26 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
26 releases · first in 2021
1 release in the last 12 months
see the full history below
Release timeline
26 releases · Mar 2021 to Oct 2025Releases
latest 26-
0.50.310 Oct 2025Release notes
Open source →What's Changed
- fix clippy doc warning by @fdncred in #68
- Update to windows-sys 0.60 by @dpaoliello in #66
- chore: widen windows-sys dependency version range by @wmmc88 in #69
- Ensure
no-stdworks via CI by @cptpiepmatz in #70 - Prepare Release by @cptpiepmatz in #72
New Contributors
- @dpaoliello made their first contribution in #66
- @wmmc88 made their first contribution in #69
- @cptpiepmatz made their first contribution in #70
Full Changelog: v0.50.1...v0.50.3
There's no v0.50.2, someone external bumped the patch version in a PR causing us to skip a version by accident.
-
0.50.123 Jul 2024 -
0.50.022 Jan 2024Release notes
Open source →What's Changed
- Rename the LICENCE file to LICENSE by @newpavlov in #51
- gnu_legacy: with GNU, write foreground first, else background first. by @sylvestre in #54
- Bump to 0.50 by @kubouch in #56
New Contributors
- @newpavlov made their first contribution in #51
- @sylvestre made their first contribution in #54
- @kubouch made their first contribution in #56
Full Changelog: v0.49.0...v0.50.0
-
0.49.022 Jul 2023Release notes
Open source →This release attempts to fix API limitations of the previous
0.48.0release.
You can now again constructStyledirectly through its fields.Breaking changes
coming from
0.47.0- Style has now a
prefix_with_resetfield to enable additional reset sequences that are introduced before setting a style.
coming from
0.48.0Style.with_resethas been renamed toStyle.prefix_with_resetAnsiGenericString::hyperlink()changed in signature from...(&mut self, ...)to...(self, ...) -> SelfAnsiGenericString::icon()and::cwd()have been removed for now.
What's Changed
- Fix Re-enabling manual Style creation by @mhelsley in #47
- Use chaining for
AnsiGenericString::hyperlinkby @sholderbach in #48 - Make
Style.with_resetmore explicit asprefix_with_resetby @sholderbach in #50 - Bump version for 0.49 release by @sholderbach in #49
Full Changelog: v0.48.0...v0.49.0
- Style has now a
-
0.48.006 Jun 2023Release notes
Open source →Warning
This release introduces an unintended breaking change for users that want to constructStyledirectly. (see #46 for tracking)New features
This release introduces support to express several OSC control codes by calling methods on
AnsiGenericString. Primarily you can now mark particular text with a hyperlink by calling.hyperlink()on it.use nu_ansi_term::AnsiString; let link_string = AnsiString::from("Learn more about this crate!").hyperlink("https://docs.rs/nu-ansi-term");
Additional OSC codes:
Note
If these features are usable depends on the terminal emulator.AnsiString::title()to set the title bar of the terminal emulator.AnsiString::cwd()to inform the terminal about changes to the working directory.AnsiString::icon()to supply an icon that the terminal may use for the application.
GNU legacy compatible output
The new crate feature
gnu_legacywill output CSI sequences which include leading zeros to be compatible with the GNU coreutils test suiteAbility to force a reset of the style
nu-ansi-termstrives to only output the ANSI sequences necessary to express the desired style. In some situation it may be beneficial to force the terminal emulator to reset its internal style before applying a new style.
To do so you can now useStyle.reset_before_style().Other changes
Changelog
- Unit tests update by @jaudiger in #34
- Quick fix around doc tests regarding Color::prefix(). by @jaudiger in #35
- Remove useless macro #[allow(dead_code)] by @jaudiger in #37
- Update
windows-systo 0.48 by @nickelc in #38 - Add feature: gnu_legacy mode for ansi styles by @alexkunde in #39
- Add resetted styling by @alexkunde in #40
- update dependencies by @fdncred in #42
- Add support for hyperlinks and other OSC codes by @mhelsley in #43
- Revert removal of the patch versions by @sholderbach in #44
New Contributors
- @alexkunde made their first contribution in #39
- @mhelsley made their first contribution in #43
Full Changelog: v0.47.0...v0.48.0
-
0.47.013 Mar 2023Release notes
Open source →Breaking changes
- Bumped minimum supported Rust version (MSRV) to 1.62.1 (@nickelc in #30)
- Change of
Color::default()value to the ANSI default colorColor::Default(code39and49for foreground and background respectively). This replacesColor::Whiteas the default value. (@jaudiger in #29)
Improvements and new features
constification of several functions and methods. (@jaudiger in #22)- Added
AnsiGenericString::as_str()to allow access to the underlying string. (@rhzx86 in #12) - Replaced
winapidependency withwindows-sys(@kgrech in #16, @nickelc in #19) - Removed
overloaddependency and implement the provided operators forRgbmanually (@nickelc in #13) - Updated to Rust edition 2021. (@jaudiger in #21)
- Improved CI workflow. (@nickelc in #18, #17, and #26)
- Fixed several mistakes in README. (@j16r, @bwinchester, @sourcefrog)
- Added
CHANGELOG.mdfor changes since forkingansi_term. (@fdncred, @nickelc, @sholderbach)
New Contributors
- @j16r made their first contribution in #10
- @bwinchester made their first contribution in #11
- @rhzx86 made their first contribution in #12
- @nickelc made their first contribution in #13
- @sourcefrog made their first contribution in #15
- @kgrech made their first contribution in #16
- @jaudiger made their first contribution in #21
Full Changelog: v0.46.0...v0.47.0
Release notes
Open source →Breaking changes
- Bumped minimum supported Rust version (MSRV) to 1.62.1
- Change of
Color::default()value to the ANSI default colorColor::Default(code39and49for foreground and background respectively). This replacesColor::Whiteas the default value.
Other changes
constification of several functions and methods.- Improved CI workflow.
- Updated to Rust edition 2021.
- Replaced
winapidependency withwindows-sys. - Removed
overloaddependency. - Added
AnsiGenericString::as_str()to allow access to the underlying string. - Fixed typos in README.
- Added
CHANGELOG.mdfor changes since forkingansi_term.
-
0.46.003 Jun 2022 -
0.45.127 Mar 2022Release notes
Open source →- Added
Color::Defaultenum variant with ansi codes39and49for foreground & background.
- Added
-
0.45.016 Mar 2022Release notes
Open source →- Cleanup Cargo.toml
- Repository reference
- Remove obsolete entries
- Enable doctests
- Fix doctests
Account for renaming of the types to follow Pascal case rules
Release notes
Open source →- Fixed examples in README.
- Fixed typos in documentation.
- Renamed
ANSIByteStringstoAnsiByteStrings. - Added GitHub Actions workflow.
- Changed authors metadata.
- Updated license
-
0.44.008 Feb 2022Nothing published for this version
-
0.43.018 Jan 2022 -
0.42.028 Dec 2021Nothing published for this version
-
0.41.007 Dec 2021Nothing published for this version
-
0.40.016 Nov 2021 -
0.39.027 Oct 2021Nothing published for this version
-
0.38.005 Oct 2021 -
0.37.014 Sep 2021 -
0.36.024 Aug 2021Nothing published for this version
-
0.35.003 Aug 2021Nothing published for this version
-
0.34.013 Jul 2021Nothing published for this version
-
0.33.022 Jun 2021Nothing published for this version
-
0.32.001 Jun 2021Nothing published for this version
-
0.31.011 May 2021Release notes
Open source →- Implemented
Defaulttrait forColorreturningColor::White. - Added helpers for gradients.
- Fixed clippy warning.
- Implemented
-
0.30.021 Apr 2021 -
0.29.030 Mar 2021Release notes
Open source →- Renamed
Color::RGBenum variant toColor::Rgb. - Renamed
ANSIByteStringtoAnsiByteString. - Renamed
ANSIGenericStringtoAnsiGenericString. - Renamed
ANSIGenericStringstoAnsiGenericStrings. - Renamed
ANSIStringtoAnsiString. - Renamed
ANSIStringstoAnsiStrings.
- Renamed
-
0.28.009 Mar 2021Release notes
Open source →- Forked
ansi_termasnu-ansi-term. - Added Nushell project contributors to the authors.
- Updated README.md.
- Renamed
ColourtoColor. - Renamed some files ending in
colourtocolor. - Added "bright" colors ansi 90-97 (foreground) and 100-107 (background).
- Ran cargo fmt
- Forked