Skip to content

v2.0.0

Compare
Choose a tag to compare
@joshstoik1 joshstoik1 released this 03 Apr 19:29
· 14 commits to master since this release

Binary

The fyi binary has two new prefix types: aborted and found.

Library

The underlying fyi_msg library has been heavily refactored. The public API is mostly the same as it was before, but some changes may be required when updating to this release.

New

  • AnsiColor
  • MsgKind::Aborted
  • MsgKind::Found
  • fit_to_width (fitted feature)

Changed

  • Prefix handling — built-in vs custom — is now unified via a trait;
    • Msg::new, Msg::set_prefix, and Msg::with_prefix now work for either prefix type;
    • Msg::custom, Msg::plain, Msg::set_custom_prefix, and Msg::with_custom_prefix have been removed;
  • Msg::set_indent/Msg::with_indent now support up to 8 tabs
  • ANSI/width operations are faster and more accurate;
  • Msg::fitted is now multi-line aware (each line will be fitted separately) and returns Cow<str> instead of Cow<[u8]>
  • Msg::fitted also preserves all ANSI sequences from cut regions, instead of just appending a generic reset
  • length_width and width now take &str instead of &[u8]
  • MsgKind::prefix_color now returns Option<AnsiColor> instead of Option<u8>;

Removed

  • Msg::with_flags
  • MsgFlags
  • MsgKind::prefix
  • NoAnsi

Note: The attached .deb package requires an x86-64-v3-capable CPU. You can use this script from the XanMod Kernel project to verify your system's support level if you're unsure.