Skip to content

v0.7.0

Compare
Choose a tag to compare
@mikaelmello mikaelmello released this 24 Feb 06:28
· 28 commits to main since this release

Breaking Changes

  • The Select and Multiselect Filter now scores input and is now expected to return an Option<i64>, making it possible to order/rank the list of options. #176
    None: Will not be displayed in the list of options.
    Some(score): score determines the order of options, higher score, higher on the list of options.
  • Improved user experience on Password prompts. When there is a validation error, the input is cleared if the password is rendered using the Hidden display mode, matching the user expectation of having to write the password from scratch again. Thanks to @CM-IV for the questions on #149!
  • Allow lifetime customization of RenderConfig. #101. Thanks to @arturfast for the suggestion #95.
  • Implement fuzzy search as default on Select and MultiSelect prompts. Thanks @Baarsgaard! #176
  • Revamped keybindings for DateSelect.

Features

  • Add one-liner helpers for quick scripts. #144.
  • Add new option on MultiSelect prompts to set all options to be selected by default. Thanks to @conikeec for the suggestion (#151)!
  • Add new option on Select/MultiSelect prompts allowing to reset selection to the first item on filter-input changes. #176
  • Emacs-like keybindings added where applicable (@jasonish, @EnigmaCurry):
    • Ctrl-p/Ctrl-n for up/down
    • Ctrl-b/Ctrl-f for left/right
    • Ctrl-j/Ctrl-g for enter/cancel
  • Vim keybindings are always supported in DateSelect prompts.
  • Added 'with_starting_filter_input' to both Select and MultiSelect, which allows for setting an initial value to the filter section of the prompt.
  • Added starting_input for CustomType. (@FroVolod #194)
  • Added 'without_filtering' to both Select and MultiSelect, useful when you want to simplify the UX if the filter does not add any value, such as when the list is already short.
  • Added 'with_answered_prompt_prefix' to RenderConfig to allow customization of answered prompt prefix.
  • Improved rendering, with optimizations on incremental rendering and terminal resizing.

Fixes

  • Fixed typos in the code's comments (@kianmeng, @bheylin).
  • Fixed issue where inquire, using termion, would crash when receiving piped inputs.

Dependency changes (some breaking)

  • Upgraded underlying termion crate from v1.5 to v2.0.
  • Upgraded underlying bitflags from v1 to v2, which affects the Attributes and KeyModifiers crates. If you use any of bitflag's methods directly, you might be affected, refer to the bitflags changelog for more information.
  • Removed thiserror dependency in favor of implementing InquireError by hand. (@bheylin #146)
  • Raised MSRV to 1.66 due to requirements in downstream dependencies.
  • MSRV is now explicitly set in the package definition.
  • Replaced lazy_static with once_cell as once_cell::sync::Lazy is being standardized and lazy_static is not actively maintained anymore. (@bheylin #158)
  • Added fuzzy-matcher as a dependency for fuzzy filtering in Select and MultiSelect prompts #176