Follow

New release! 🎀 Gum: a tool for glamorous shell scripts. It provides highly configurable utilities to help you write useful and delightful scripts with just a few lines of code.

github.com/charmbracelet/gum

@charm I love it 💖
Also, please relay to the artist of the main Gum illustration that they nailed it!

@charm @fribbledom Does this have any capability for fallback on dumb terminals? Does it respect $TERM?

@a @charm

Depends how "dumb" of a terminal we're talking. It'll require control sequences for things like cursor positioning, but it will absolutely respect things like $TERM and $COLORTERM and tries to adapt to the terminal capabilities: for example RGB color values will be downsampled to the closest available color for ANSI16/ANSI256 terminals.

@a @charm

A series of steps:

1. fallback to looking at alternative env vars like COLORTERM
2. send OSC queries to actively detect terminal support
3. if all fails, assume a terminal that understands the most basic ANSI sequences but strip markup like colors & styles

@fribbledom @charm That’s too bad. I guess the COLORTERM check seems fine, but everything after that is going to result in printing garbage for me. I really wish programs would believe me when I tell them thing.

@a @charm

No, it really shouldn't print any garbage. If it does I'd love to hear more about the terminal you're using.

@charm Every time you release something new I lose a week of time as I make a bunch of useless toys with it.

...and it's time well spent!

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!