Commit graph

29 commits

Author SHA1 Message Date
Carlos Alexandro Becker
6045525ab9
feat: adding --padding to most commands (#960)
* feat(filter,choose): allow UI to be padded

* feat: --padding everywhere

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: unrelated lint issue

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: filter

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: use ordered.Clamp

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2025-09-05 13:55:10 -03:00
Carlos Alexandro Becker
817c4bd446
fix: lint issues (#909)
* fix: some of the lint issues

* fix: staticcheck
2025-05-30 10:34:31 -03:00
Carlos Alexandro Becker
4cedf9fca0
feat: --no-strip-ansi (#784)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Sridaran Thoniyil <sri7thon@gmail.com>
2024-12-17 13:56:19 -03:00
Carlos Alexandro Becker
2e53efc0ec
feat(style): trim line spaces (#767)
Lipgloss applies aligning on the string as given to it, and ascii art
usually contain left whitespaces to align things.

This adds an option to trim space on all lines of the input, before
giving it to lipgloss, so aligning use only non-whitespace content.
2024-12-11 14:00:55 -03:00
Carlos Alexandro Becker
2939e516cc
fix(pager): do not strip ansi sequences (#754) 2024-12-09 17:54:17 -03:00
Carlos Alexandro Becker
96448e08e5
fix: show background style help (#641)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-07-25 16:56:03 -04:00
Mikael Fangel
2fe0291e02
fix(stdin): add trim of trailing newline (#577)
* stdin: add trim of trailing newline

* choose: remove trimsuffix

* filter: remove trimsuffix

* style: remove trimsuffix
2024-05-25 14:44:01 -04:00
Maas Lalani
32c9d20692
fix(lint): groupName is unused 2023-11-29 11:38:27 -05:00
Maas Lalani
01a66511a1
Hide Style Flags consistently (#457)
* refactor: hide style flags on error to not clutter usage

* docs(style): add comment regarding dynamically hiding flags
2023-11-28 14:17:57 -05:00
Maas Lalani
89e2a0fbd5
feat: static --print table (#436) 2023-10-16 10:51:31 -04:00
Maas Lalani
614f0e8028
feat(style): allow passing input over stdin 2022-11-09 23:13:21 -05:00
Maas Lalani
2bea4dc030 feat(file): gum file to pick files 2022-10-07 15:38:48 -04:00
Maas Lalani
430ab459d7 feat(pager): gum pager for scrolling through long documents 2022-10-07 15:38:48 -04:00
Maas Lalani
1479184f3f fix: satisfy all linters 2022-08-05 02:33:40 -04:00
Maas Lalani
46ce0e4761 feat: allow configuration via environment variables 2022-08-04 11:22:42 -04:00
maplepie
eadcc5510f
fix(style): print flags in style command (#91)
current style command doesn't print Style Flags in help flag
2022-08-03 13:43:20 -04:00
Maas Lalani
cb590e324e chore: fix linting 2022-07-30 18:04:26 -04:00
Maas Lalani
6d1e4d46cf
fix: border-foreground from showing up in help 2022-07-26 22:44:45 -04:00
Maas Lalani
108a680385
feat: gum confirm 2022-07-26 15:43:26 -04:00
Ayman Bagabas
eaef49cdbe
feat: autocompletion 2022-07-25 13:03:18 -04:00
Maas Lalani
5de4df66d2
refactor: add package comments describing behavior 2022-07-13 09:55:36 -04:00
Maas Lalani
912157521c
docs: group style flags so that they appear at the bottom 2022-07-12 22:48:44 -04:00
Maas Lalani
7190822247
refactor(kong): Implement Run(...) error interface
Instead of needing to run the commands manually in main.go, we can implement the `Run(...) error` method to satisfy the command interface so that `kong` can Run our commands for us.
2022-07-12 22:33:52 -04:00
Maas Lalani
02e925ea57
refactor: use embedded style struct for all lipgloss styling
This commit uses the embedded style struct for styling in all components. The most notable example is `gum write` where there are many styles that are used and composed for each component of the command.
2022-07-12 16:08:33 -04:00
Maas Lalani
569c2cc622
refactor: embed style struct for reusability in styling other components 2022-07-12 10:07:29 -04:00
Maas Lalani
53aa5c6a90
feat: Add gum join command 2022-07-07 19:32:21 -04:00
Maas Lalani
9f4f9ecbf1
refactor: rename to gum 2022-07-07 14:59:27 -04:00
Maas Lalani
25a12fbbc6
feat: gum style can take multiple arguments 2022-07-07 13:29:10 -04:00
Maas Lalani
09feddcc61
feat: Add gum style command
Style provides a shell script interface for Lip Gloss. It allows you to
use Lip Gloss to style text without needing to use Go. All of the
styling options are available as flags.

Let's make some text glamorous using bash:

```
gum style \
    --foreground "#FF06B7" --border "double" \
    --margin 2 --padding "2 4" --width 50 \
    "And oh gosh, how delicious the fabulous frizzy frobscottle" \
    "was! It was sweet and refreshing. It tasted of vanilla and" \
    "cream, with just the faintest trace of raspberries on the" \
    "edge of the flavour. And the bubbles were wonderful."
```

Output:

```
╔══════════════════════════════════════════════════╗
║                                                  ║
║                                                  ║
║    And oh gosh, how delicious the fabulous       ║
║    frizzy frobscottle was It was sweet and       ║
║    refreshing. It tasted of vanilla and          ║
║    cream, with just the faintest trace of        ║
║    raspberries on the edge of the flavour.       ║
║    And the bubbles were wonderful.               ║
║                                                  ║
║                                                  ║
╚══════════════════════════════════════════════════╝
```
2022-07-07 13:29:10 -04:00