Commit graph

433 commits

Author SHA1 Message Date
Ayman Bagabas 504a2060b2
fix(log): use log default colors 2023-11-08 12:12:06 -05:00
Ayman Bagabas 7bae4c8fcb
fix(log): default info level color
https://github.com/charmbracelet/log/blob/main/styles.go#L67
2023-11-08 12:09:50 -05:00
Maas Lalani bf3864e231
Log predefined time formats (#452)
* feat: allow predefined time formats

* refactor(log): use time format constants

* feat(log): time format flag -> time flag

* docs: add formats to help
2023-11-08 12:03:49 -05:00
Maas Lalani 3839b8d6e1
docs(log): add gif 2023-11-08 11:11:50 -05:00
Maas Lalani 055aa0d791
feat(log): add short flags 2023-11-08 11:10:58 -05:00
Maas Lalani 12ef4d3085
docs(log): add log to the readme 2023-11-08 10:59:16 -05:00
Ayman Bagabas 86dbd9c70f
fix: add missing import 2023-11-08 10:44:36 -05:00
Ayman Bagabas 7d51fd8b73
feat: add log command (#449)
* feat: add log command

* fix: lint

* refactor: remove switch

* fix: use one level style embed

* fix(log): lint

* Update log/command.go

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-11-08 10:43:50 -05:00
Christian Höltje 46328de806
feat(write): ESC should be successful (#433)
Change ESC from aborting to successful quitting.

'vi' users press ESC as an uncontrollable tick, making using 'gum write'
painful when all their work is lost.
2023-10-19 12:38:23 -04:00
dependabot[bot] 8e959e4cdc
feat(deps): bump github.com/alecthomas/kong from 0.8.0 to 0.8.1 (#438)
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong) from 0.8.0 to 0.8.1.
- [Commits](https://github.com/alecthomas/kong/compare/v0.8.0...v0.8.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>
2023-10-19 12:33:51 -04:00
dependabot[bot] 1cedd4f20b
feat(deps): bump github.com/mattn/go-isatty from 0.0.19 to 0.0.20 (#441)
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.19 to 0.0.20.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.19...v0.0.20)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  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>
2023-10-19 12:33:18 -04:00
Maas Lalani 89e2a0fbd5
feat: static --print table (#436) 2023-10-16 10:51:31 -04:00
Mikael Fangel 971b6cf16f
fix(filter): made filter work with lists as choose (#424)
* made filter work with lists as choose

* lint fix

* response to code review
2023-10-03 16:33:57 -04:00
dependabot[bot] 77aa8640f2
chore(deps): bump actions/checkout from 3 to 4 (#418) 2023-09-05 12:39:55 +00:00
Greg Kroah-Hartman a63ea30136
spin: fix isTTY check (#404)
The isTTY check is inverted in the --show-output option for spin, so no
output is shown anymore.  Fix this by correctly checking if we are a tty
or not.
2023-07-28 10:40:18 -04:00
Maas Lalani a61f3bdc3f
fix(choose): --no-limit when 1 option available should still allow selection 2023-07-25 12:38:55 -04:00
Maas Lalani 6763de12e8
fix(choose): set initial page for selected 2023-07-25 12:34:00 -04:00
Maas Lalani 4b998515fd
feat(choose): use home/end to go to first/last option 2023-07-25 12:28:02 -04:00
Chris Long ed52291b33
docs: Add WinGet installation details (#401) 2023-07-25 12:23:48 -04:00
Kenny Parnell f5b09a434a
Switch to termenv.EnvColorProfile() (#387)
* Switch to termenv.EnvColorProfile()

This will allow users to set `NO_COLOR` and `CLICOLOR_FORCE` when they need to override the detected values.

* Update main.go
2023-07-20 14:14:31 -04:00
Dieter Eickstaedt d1ad453ce6
feat: Timeout for Choose Command (#384) 2023-06-30 09:28:46 -04:00
Dieter Eickstaedt f73341a56c
feat: Timeout for File Command (#386) 2023-06-30 09:22:45 -04:00
Dieter Eickstaedt eef6431d7c
feat: Timeout for Confirm Command (#383)
* feat: Timeout for Confirm Command

* fix: comment

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-06-30 09:20:33 -04:00
Dieter Eickstaedt 6bf79aa899
feat: Timeout for Filter Command (#382) 2023-06-30 09:18:02 -04:00
Dieter Eickstaedt f8caeef195
feat: Timeout for Spin Command (#385)
* feat: Timeout for Spin Command

* fix: spin timeout

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-06-30 09:17:09 -04:00
Maas Lalani 0c1cc8e669
fix(pager): lint 2023-06-29 17:43:58 -04:00
Dieter Eickstaedt 7e71c4d664
feat: Adding timeout option to Filter command (#380) 2023-06-29 17:29:46 -04:00
Dieter Eickstaedt abae6fd80c
feat: Adding timeout option to Pager command (#381) 2023-06-29 17:27:25 -04:00
Maas Lalani b6f739d7d1
refactor: use exit.StatusAborted, unexport heightOffset 2023-06-29 16:36:47 -04:00
Dieter Eickstaedt ae1da5d329
Feature/218/adding timeout option (#379)
* feat: Adding timeout option in preparation for coming timeout features in all commands

* feat: Adding timeout option in preparation for coming timeout features in all commands

* feat: Adding timeout option in preparation for coming timeout features in all commands

* chore: Linter issues
2023-06-29 16:35:03 -04:00
dependabot[bot] 93ffc250e7 feat(deps): bump github.com/muesli/termenv
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.15.2-0.20230323153104-73a40463ff25 to 0.15.2.
- [Release notes](https://github.com/muesli/termenv/releases)
- [Commits](https://github.com/muesli/termenv/commits/v0.15.2)

---
updated-dependencies:
- dependency-name: github.com/muesli/termenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 14:35:22 -04:00
ROMAIN GUISSET 99f1348a45 feat(filter): add cursor text line styling 2023-06-27 10:37:13 -04:00
Maas Lalani 6aac40560f
fix: isTTY & no new line 2023-06-27 10:36:33 -04:00
Rose Thatcher f048bd8d87
feat(Spin): Option to show live output (#303)
* Added live output buffer and option flag

* Update Spin on README.md

* Returned output formatting to previous version.

* Separated the showOutput and liveOutput flags.
Both flags can now be used at once.

* Removed liveOutout flag
showOutput flag is now realtime

* (spin) Consolodated stderr and stdout

* (spin) Consolodated stdout and stderr

* (spin) If being piped, writes to stdout

* Added error check and did some housekeeping

* No longer outputs to tea.View if piped

* Cleaned up the combining of stderr and stdout

* Fixed spinner alignment.  Updated Readme
2023-06-27 10:31:54 -04:00
dependabot[bot] f1b99f0aa4 feat(deps): bump github.com/mattn/go-isatty from 0.0.18 to 0.0.19
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.18 to 0.0.19.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.18...v0.0.19)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 10:18:34 -04:00
dependabot[bot] fd11b787e0 feat(deps): bump github.com/alecthomas/kong from 0.7.1 to 0.8.0
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong) from 0.7.1 to 0.8.0.
- [Commits](https://github.com/alecthomas/kong/compare/v0.7.1...v0.8.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>
2023-06-27 10:18:26 -04:00
dependabot[bot] 0010018d61 feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.24.1...v0.24.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>
2023-06-07 11:33:26 -04:00
Maas Lalani 8f17aa3f9a feat(write,input): add --cursor.mode=hide,blink,static 2023-06-05 16:08:40 -04:00
Maas Lalani 3609fe1da8
feat: use file picker v0.16.1 2023-05-31 14:07:00 -04:00
Maas Lalani 3f7db714ff
fix(format): indentation issues 2023-05-31 11:09:15 -04:00
Carlos Alexandro Becker 5a4b12c8ca feat: gum filter --no-sort
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-30 09:42:41 -05:00
Carlos Alexandro Becker a892c39289
fix: format pager/options.go
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-30 14:29:41 +00:00
Maas Lalani accce59ed1 fix: bump to v0.24.1 2023-05-24 13:17:02 -04:00
dependabot[bot] 25ff33e710 feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.23.3-0.20230316100943-248eb83001a7 to 0.24.0.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/commits/v0.24.0)

---
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>
2023-05-24 13:17:02 -04:00
Maas Lalani 4c3cc1773f
feat: add kaomoji example 2023-05-22 15:00:53 -04:00
Christian Rocha 6e802805cf fix(docs): correct LipglossPadding doc comment 2023-05-18 12:26:33 -04:00
Christian Rocha b23ebce896 fix: measure runes instead of bytes when truncating
There are a couple of gotchas in LipGlossTruncate:

* len() returns the number of bytes in a string
* slicing a string slices it on a byte level

The fix would normally be to convert the string to a slice of runes and
operate on that new slice:

r := []rune(str)

However, reflow already contains an ansi-aware truncate feature that we
can use instead as a drop-in replacement for the LipGlossTruncate
function.
2023-05-18 11:45:14 -04:00
Mikael Fangel c8710071ad
feature(pager): add search functionality (#321)
* Added initial search functionality

 * Added a handler for the key presses
 * Added a searchbar at the bottom of the screen
 * Made search results cycleable by pressing n

* correct start pos and ignore keys while searching

* fix out of bound error when pressing n

* made the matching pattern relative to the current pos

* added p for searching for previous match

* added highlighting to search matches

* dynamically replaced all matches

* fixed string highlight issue

* fixed truncation issue

* small simplifaction in ypos logic

* made prev and next behave the same atBottom

* simplified logic and fixed linter errors

* updated help text

* style changes

* added comments

* fixed truncation issue

* fixes infinte loop on very long lines

* added simple lipgloss truncate function

* updated colors for better contrast

* lint fix

* initial commit for soft-wrap functionality

* linter corrections and added for pager with new model

* added generic functions to a utility package

* fix soft lint errors

* made N match previous as well as p

* replaced help text when search is active

* ran gofmt -w

* reimplemented search and next to enabled support for dynamic highlights

* made the highlight move as you progress through the search

* simplified highlighter

* improvements to the clean up of the highlight function

* semi working reverse search

* reverse search without highlight

* added semi working highlight for reverser search

* working version of previous match

* fixed issue with single letter matches in next

* added support for softwrapping

* respond to soft lint warnings

* removed unused function

* lint

* simplified matchers and fixed duplicate highlights

* optimisations and change in matching pattern

* fixed bug in lipglosspadding and allowed matching 1 etc.

* make highlight respect user settings

* fixed logic error in slice

* made prev match wrap around

* fix: show next/prev match help when active

* updated how view port line is set

* avoid crashes when regex doesn't compile

* fix: spelling previous

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-05-14 23:19:07 -04:00
Ayman Bagabas 23c56854d3
fix(ci): remove soft-serve workflow 2023-05-12 14:10:10 -04:00
Maas Lalani c668e153e6 feat(format): add GUM_FORMAT_THEME / GUM_FORMAT_LANGUAGE environment variable configuration 2023-05-11 23:45:29 -04:00