* feat(version): adds command to check current gum version
closes#352
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update version/command.go
Co-authored-by: Gareth Jones <Jones258@Gmail.com>
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Gareth Jones <Jones258@Gmail.com>
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.
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>
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
* 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>
- `--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>
* 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>
* 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>