v0.4.0

charmbracelet/gumv0.4.0Aug 4, 2022by github-actions[bot]

AI Summary

Users can now configure default styling for commands using environment variables. The release also adds character limiting to input and write commands.

Key Highlights

  • Environment variables for default styling (e.g., `GUM_FILTER_INDICATOR`)
  • `--char-limit` flag on `gum write` and `gum input`

New Features

  • environment variables for styling
  • --char-limit

Full Release Notes

### Gum Themes!

You can now configure Gum to use default styling for different commands with `$ENVIRONMENT_VARIABLES`. Gum will use this configuration by default (`--flags` can override these settings):

For example, `gum filter` can be customized with the following:

```bash
export GUM_FILTER_INDICATOR="*"
export GUM_FILTER_INDICATOR_FOREGROUND=1
export GUM_FILTER_PROMPT="→"
export GUM_FILTER_PROMPT_FOREGROUND=1

# command will now use default customization from the environment variables but
# can still be overridden by flags.
gum filter
```

#### New Features
* `--char-limit` flag is now available on `gum write` and `gum input` to limit the number of characters typed into the inputs.

#### Bug Fixes
* Fix readability on light theme for `gum confirm`
* `gum style --help` now lists all flags available
* `gum filter` uses alternative screen buffer if no `--height` is specified to preserve screen history when it exits (with `--height` flag it runs inline)

**Full Changelog**: https://github.com/charmbracelet/gum/compare/v0.3.0...v0.4.0

* * *

<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@charm), or on [Slack](https://charm.sh/slack).