Carlos Alexandro Becker
2741e2eebb
fix(spin): if not a tty, only print title, do not open tty for stdin
...
closes #328
2024-12-10 21:47:00 -03:00
Carlos Alexandro Becker
b0c9c58302
fix(stdin): trim space instead of \n ( #761 )
...
we were trimming an ending \n, but it would then break a \r\n sequence, causing misrenders.
this fixes it
closes #682
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-10 21:27:13 -03:00
Carlos Alexandro Becker
8d611cb7df
fix(table): grow table rows based on --columns ( #760 )
...
* fix(table): grow table rows based on --columns
closes #411
* fix: merge
2024-12-10 21:26:49 -03:00
Carlos Alexandro Becker
a8cce1cad9
feat(table): --lazy-quotes and --fields-per-record ( #759 )
...
As per [csv.Reader].
closes #345
2024-12-10 21:18:13 -03:00
Carlos Alexandro Becker
bf06fce1c9
fix(table): set widths ( #758 )
...
I'm not sure about this, as it might be slow in big tables...
This will go through all rows, calculate their widths, and set it as the
column width if none was provided with `-w`.
```console
$ echo -e "a,b\naaaaaaaaaaaaaaaaaaaaaaa,bbbbbbbbbbbbbbbb" | gum table
a b
… …
$ echo -e "a,b\naaaaaaaaaaaaaaaaaaaaaaa,bbbbbbbbbbbbbbbb" | gum table
a b
aaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbb
$ echo -e "a,b\naaaaaaaaaaaaaaaaaaaaaaa,bbbbbbbbbbbbbbbb" | gum table -w 5,5
a b
aaaa… bbbb…
```
closes #285
2024-12-10 21:17:53 -03:00
Carlos Alexandro Becker
2b090e8cb5
feat(table): add help ( #756 )
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-10 14:45:32 -03:00
Carlos Alexandro Becker
cc71f600f2
fix(table): ignore BOM ( #757 )
...
* fix(table): ignore BOM
closes #520
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: lint issue
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: simplify
* fix: better error
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-10 14:45:18 -03:00
Carlos Alexandro Becker
b58aad189a
docs(format): add table example
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-10 12:10:42 -03:00
Carlos Alexandro Becker
afb6111258
fix(spinner): set stdin and stderr
...
fixes #266
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-10 11:48:47 -03:00
Carlos Alexandro Becker
c25be3c8c3
feat(pager): make --soft-wrap the default
...
closes #744
2024-12-09 22:16:58 -03:00
Carlos Alexandro Becker
01892a027f
fix(write): max height, max chars ( #753 )
2024-12-09 20:53:54 -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
2e2b020541
fix(pager): use help bubble ( #748 )
2024-12-09 15:05:12 -03:00
Carlos Alexandro Becker
fb543c3294
fix: strip ansi sequences from stdin ( #739 )
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-09 14:44:43 -03:00
Carlos Alexandro Becker
71d7e6539c
feat: handle focus/blur events ( #749 )
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-09 14:41:29 -03:00
Carlos Alexandro Becker
4f469522d5
feat: handle interrupts and timeouts ( #747 )
2024-12-09 14:30:35 -03:00
Carlos Alexandro Becker
e30fc5ecdf
refactor: removing huh as a dep ( #742 )
...
* Revert "feat: huh gum write (#525 )"
This reverts commit 4d5d53169e .
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Revert "Use Huh for Gum Confirm (#522 )"
This reverts commit f7572e387e .
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* revert: Use Huh for Gum Choose (#521 )
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* revert: feat: huh for gum input (#524 )
* revert: feat: huh file picker (#523 )
* feat: remove huh
* fix: timeouts
* fix: lint issues
* fix(choose): quit on ctrl+q
ported over 63a3e8c8ce
* fix: ctrl+a to reverse selection
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: better handle spin exit codes
* fix(file): bind --[no-]permissions and --[no-]size
* feat(confirm): show help
* fix(confirm): fix help style
* fix(file): help
* fix(input): --no-show-help doesn't work
* fix(input): help
* fix(file): keymap improvement
* fix(write): focus
* feat(write): ctrl+e, keymaps, help
* feat(choose): help
* feat(filter): help
* refactor: keymaps
* fix(choose): only show 'toggle all' if there's no limit
* fix(choose): don't show toggle if the choices are limited to 1
* fix(filter): match choose header color
* fix(filter): add space above help
* fix(filter): factor help into the height setting
* chore(choose,filter): use verb for navigation label in help
* fix(filter): hide toggle help if limit is 1
* fix(file): factor help into height setting (#746 )
* fix: lint issues
* fix(file): handle ctrl+c
* fix: remove full help
* fix: lint
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2024-12-09 13:18:35 -03:00
dependabot[bot]
d74e9ea531
chore(deps): bump github.com/alecthomas/kong from 1.5.1 to 1.6.0 ( #750 )
...
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong ) from 1.5.1 to 1.6.0.
- [Commits](https://github.com/alecthomas/kong/compare/v1.5.1...v1.6.0 )
---
updated-dependencies:
- dependency-name: github.com/alecthomas/kong
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 04:16:12 +00:00
Olaf Alders
a5fb6b1798
docs: quote tmux session name in code sample ( #745 )
...
A tmux session name could contain a space. Quote the variable to avoid
the session name being split on spaces.
2024-12-06 15:13:48 -03:00
Carlos Alexandro Becker
29250f8feb
fix(filter): --no-strict not working, also weird behavior ( #737 )
...
- `--no-strict` was erroring as non-existent option
- when `--no-strict`, we should actually create a "fake" option with
whatever the user is typing
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-04 10:34:22 -03:00
Carlos Alexandro Becker
71af32ce16
fix(spin): properly redirect output
...
closes #690
2024-12-04 10:32:45 -03:00
Carlos Alexandro Becker
c422e76fe3
fix: clarify filter --sort flag ( #738 )
...
* fix: clarify filter --sort flag
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: if sort, sort options alphabetically first
* Revert "fix: if sort, sort options alphabetically first"
This reverts commit 86e8fc0a5b .
* fix: filter
* Update filter/options.go
Co-authored-by: Christian Rocha <christian@rocha.is>
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2024-12-04 09:02:06 -03:00
Carlos Alexandro Becker
63a3e8c8ce
fix(filter): abort on ctrl+q ( #721 )
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-12-03 11:40:24 -03:00
ctn-malone
cb61fe6c84
chore(nix): update src hash ( #733 )
2024-12-03 11:39:51 -03:00
dependabot[bot]
90919986f2
chore(deps): bump github.com/alecthomas/kong from 1.5.0 to 1.5.1 ( #736 )
...
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong ) from 1.5.0 to 1.5.1.
- [Commits](https://github.com/alecthomas/kong/compare/v1.5.0...v1.5.1 )
---
updated-dependencies:
- dependency-name: github.com/alecthomas/kong
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 04:28:34 +00:00
dependabot[bot]
fef37dae1f
chore(deps): bump github.com/alecthomas/kong from 1.4.0 to 1.5.0 ( #735 )
...
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong ) from 1.4.0 to 1.5.0.
- [Commits](https://github.com/alecthomas/kong/compare/v1.4.0...v1.5.0 )
---
updated-dependencies:
- dependency-name: github.com/alecthomas/kong
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-02 04:16:50 +00:00
Carlos Alexandro Becker
c3e836f0dd
fix(spin): interrupt child process on ctrl+c ( #732 )
...
* fix(spin): interrupt child process on ctrl+c
This will send a SIGINT to the child process when ctrl+c is pressed.
closes #730
* fix: lint
2024-11-27 14:58:21 -03:00
Carlos Alexandro Becker
01f36b58a4
chore(deps): use huh main
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-26 12:43:44 -03:00
Carlos Alexandro Becker
fb11344ea4
fix(choose): --ordered ( #722 )
...
closes #687
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-26 12:42:54 -03:00
Pranav RK
620e645845
feat: allow cursor option in file ( #667 )
2024-11-26 12:42:27 -03:00
dependabot[bot]
e3ba400d6d
chore(deps): bump github.com/charmbracelet/bubbletea from 1.2.3 to 1.2.4 ( #731 )
...
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea ) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases )
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml )
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.2.3...v1.2.4 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 04:38:37 +00:00
dependabot[bot]
1156c33ad5
chore(deps): bump github.com/charmbracelet/x/ansi from 0.5.0 to 0.5.2 ( #729 )
...
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x ) from 0.5.0 to 0.5.2.
- [Release notes](https://github.com/charmbracelet/x/releases )
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.5.0...ansi/v0.5.2 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-22 04:19:11 +00:00
dependabot[bot]
8ed2ca5e0d
chore(deps): bump github.com/charmbracelet/x/ansi from 0.4.5 to 0.5.0 ( #728 )
...
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x ) from 0.4.5 to 0.5.0.
- [Release notes](https://github.com/charmbracelet/x/releases )
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.4.5...ansi/v0.5.0 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-21 04:56:03 +00:00
dependabot[bot]
06bdaba08f
chore(deps): bump github.com/charmbracelet/bubbletea from 1.2.2 to 1.2.3 ( #726 )
...
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea ) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases )
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml )
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.2.2...v1.2.3 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 04:37:21 +00:00
Carlos Alexandro Becker
098d09a270
fix(choose,confirm,file,filter,input,pager,spin): timeout default unit ( #724 )
...
Change it `0s` instead of `0`.
closes #402
2024-11-18 17:10:06 -03:00
Carlos Alexandro Becker
1ffe8b7e70
feat(log): support setting minimum log level with GUM_LOG_LEVEL ( #723 )
...
closes #490
2024-11-18 14:02:55 -03:00
Carlos Alexandro Becker
c868aa1c6c
fix(confirm,choose,file,input): timeout handling ( #718 )
...
* fix(confirm,choose,file,input): timeout handling
- some fields were not actually using the `--timeout` value
- some fields had different behavior when a timeout did occur. On this
matter, it seems to me the best way forward is to specifically say it
timed out, and after how long
- added exit status 124 (copied from `timeout` from coreutils) (fixes #684 )
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update main.go
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* Update internal/exit/exit.go
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
* fix: improve
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: stderr
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
2024-11-18 10:49:15 -03:00
Carlos Alexandro Becker
3cec9b7b9a
fix(filter): panic if no matches
...
closes #715
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-18 10:00:10 -03:00
Carlos Alexandro Becker
20a381a10a
Merge remote-tracking branch 'origin/main'
2024-11-18 09:09:46 -03:00
Carlos Alexandro Becker
60a4b3bf93
feat(filepicker): show permissions and size ( #717 )
...
closes #495
2024-11-18 09:07:48 -03:00
Carlos Alexandro Becker
6ad8882990
fix(table): only set height if > 0 ( #716 )
...
closes #685
closes #660
2024-11-18 09:07:19 -03:00
Ayman Bagabas
7bdd189616
fix(spin): indenting lines when command is piped ( #636 )
...
We don't need to check for isatty, always store the output to the
designated buffer.
Fixes: https://github.com/charmbracelet/gum/issues/607
2024-11-15 15:53:27 -03:00
Carlos Alexandro Becker
f8c466bf3b
fix(confirm): improve timeout handling
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-15 15:37:24 -03:00
Ayman Bagabas
6a05246f53
fix: catch huh timeout error ( #632 )
...
Huh returns a `ErrTimeout` on timeout error and we need to catch that.
Fixes: https://github.com/charmbracelet/gum/pull/618
2024-11-15 15:37:16 -03:00
Daniel Pritchett ⚡
19e79b11e4
fix(confirm): --timeout was being ignored ( #697 )
...
* fix(confirm) Options.Timeout was ignored, now works as documented
* Streamlines command.go per PR feedback
2024-11-15 14:57:27 -03:00
Dieter Eickstaedt
93da22d656
feat(table): adds --return-column ( #415 )
...
* feat: Adding Return Column to table command
Consider a table of
ID Name Description
1 Task1 Task description
It would be good to select the row but retrieve the ID for example for further processing
like 'task 1 delete' when first row was selected
* feat: Return Column boundary check fixed
* Update table/options.go
---------
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-15 13:50:37 -03:00
dependabot[bot]
c3ce2f97bf
chore(deps): bump github.com/charmbracelet/bubbletea from 1.2.1 to 1.2.2 ( #712 )
...
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea ) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases )
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml )
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.2.1...v1.2.2 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-13 04:44:49 +00:00
dependabot[bot]
03d3bcf178
chore(deps): bump github.com/alecthomas/kong from 1.2.1 to 1.4.0 ( #705 )
...
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong ) from 1.2.1 to 1.4.0.
- [Commits](https://github.com/alecthomas/kong/compare/v1.2.1...v1.4.0 )
---
updated-dependencies:
- dependency-name: github.com/alecthomas/kong
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 04:57:18 +00:00
dependabot[bot]
8a007012be
chore(deps): bump github.com/charmbracelet/x/term from 0.2.0 to 0.2.1 ( #711 )
...
Bumps [github.com/charmbracelet/x/term](https://github.com/charmbracelet/x ) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/charmbracelet/x/releases )
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.2.0...ansi/v0.2.1 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/term
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 04:55:41 +00:00
dependabot[bot]
790be1247a
chore(deps): bump github.com/charmbracelet/bubbletea from 1.1.2 to 1.2.1 ( #710 )
...
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea ) from 1.1.2 to 1.2.1.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases )
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml )
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.2.1 )
---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 04:53:45 +00:00