* 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>
* feat(choose,filter): --input-delimiter --output-delimiter
allows to change how content from stdin is used, and how results are
printed.
one could get around it piping into and from `tr`, but results aren't
quite right, especially when `tr '\n' ','` for example, as it'll add an
extra `,` in the end of the string.
This makes things a bit cleaner, hopefully.
closes#274
* fix: use new tty pkg
* 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: use 0 as default width
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: filter width
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
For some reason it wasn't printing to stdout (and I could repro that
bug even on versions before I added the newline). It was only showing
up on other streams in the shell (error stream probably), not getting
sent into pipes.
I changed it to fmt.Println.
As for the ansi-stripping that was in `filter`, LMK if that's what you
prefer and I'll add it to `choose` too. I just wanted them to match.
* Add newline printing to --select-if-one
This matches how choose works normally when there are more than
one option.
* Add newline printing to filter --select-if-one
To match how it works without --select-if-one.
* Add `--select-if-one` flag to `choose`/`filter`.
* Remove accidental commit of other changes.
* fix: use o.Options
---------
Co-authored-by: Maas Lalani <maas@lalani.dev>