Skip to content

v0.48.0

Compare
Choose a tag to compare
@sholderbach sholderbach released this 06 Jun 09:05
· 10 commits to main since this release
98b763f

Warning
This release introduces an unintended breaking change for users that want to construct Style 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

New Contributors

Full Changelog: v0.47.0...v0.48.0