v0.48.0
Warning
This release introduces an unintended breaking change for users that want to constructStyle
directly. (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_legacy
will output CSI sequences which include leading zeros to be compatible with the GNU coreutils test suite
Ability to force a reset of the style
nu-ansi-term
strives 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 use Style.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-sys
to 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