slumber

2.0.0 - 2024-09-06

v2.0.0 Sep 8 2024 at 02:21 UTC

2.0 is headlined by a highly requested feature: one-off edits to recipes! If you need to tweak a query parameter or edit a body, but don't want to modify your collection file, you can now highlight the value in question and hit e to modify it. The override will be retained until you modify the collection file or exit Slumber, at which point it will revert to its original value.

Aside from the major new feature, there is one breaking change to the escape syntax of templates. The old backslash-based syntax was fraught with edge cases and unpredictable behavior. This new syntax is simpler to use, simpler to implement, and much more bulletproof. This syntax was rare to use to begin with, so most people will be unimpacted by this change.

Here's the full list of changes:

Breaking

  • Replace backslash escape sequence with a simpler scheme based on _
    • For example, previously a key would be escaped as \{{. This introduced complexities around how to handle additional backslashes, and also required doubling up backslashes in YAML
    • The new equivalent would be {_{, which parses as {{
    • The goal of this change is to make escaping behavior simpler and more consistent
    • For more info on the new behavior, see the docs
  • Remove --log CLI argument
    • See note on log files in Changed section for why this is no longer necessary

Added

  • Edit recipe values (query params, headers, etc.) in the TUI to provide one-off values
  • Add editor field to the config, allowing you to customize what editor Slumber opens for in-app editing
  • Add !select chain type, allowing your collection to prompt the user to select a value from a static list (thanks @anussel5559)

Changed

  • !json bodies are now prettified when sent to the server
  • Use vim as default editor if none is configured
  • Move logs back to a shared file
    • They had been split into one file per session, which made them hard to find
    • The file is now eventually deleted once it exceeds a certain size

Fixed

  • Fix basic auth being label as bearer auth in Recipe Authentication pane
  • Use correct binding for search action in the placeholder of the response filter textbox
    • Previously it was hardcoded to display the default of /
  • Fix response body filter not applying on new responses
  • Support quoted arguments in editor commands
  • Fix certain UI values not persisting correctly
  • Propagate unconsumed key events from text boxes
    • E.g. F5 will now refresh the collection while a text box is in focus
  • Redraw TUI when terminal is resized
  • Clamp text window scroll state when window is resized or text changes
  • Fix extraneous input events when exiting Vim #351
  • Improve performance and fix crashes when handling large request/response bodies #356
    • Further improvements for large bodies will be coming in the future