Commit graph

364 commits

Author SHA1 Message Date
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
Maas Lalani 92c890e717
fix: use lipgloss.Width instead of runewidth.StringWidth 2023-05-11 22:21:09 -04:00
Christian Rocha ece25c7789
fix: correct copyright in man 2023-05-11 21:14:22 -04:00
Ayman Bagabas 9d2741c5f9
fix: update copyrights 2023-05-11 20:56:39 -04:00
Maas Lalani 7f54b3b289 feat(write): width < 1 uses terminal width 2023-05-11 15:13:01 -04:00
Christian Rocha 11584b5982
chore(docs): correct release year in license 2023-05-11 11:55:06 -04:00
Carlos Alexandro Becker fff07286b7
docs: update license
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-11 12:39:14 +00:00
Carlos Alexandro Becker 39346ed015 fix: missing filepicker styles
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-01 10:01:18 -04:00
Maas Lalani 99a1fa9d8e
chore(deps): update bubbles 2023-05-01 09:59:13 -04:00
Maas Lalani 8da9620bfd
chore(lint): add function comment 2023-04-12 09:57:36 -04:00
Maas Lalani 5887a10fa0 fix: strip ansi from gum filter when output is not a tty 2023-04-06 17:36:29 -04:00
Maas Lalani 6dbadf30b4 fix: strip ansi when stdout is not a tty 2023-04-06 17:36:29 -04:00
Maas Lalani 11f23830c5
fix: use Cursor.Style instead of CursorStyle 2023-03-31 11:42:09 -04:00
Maas Lalani 066c79fa14 fix(file): respect file path specified in arguments 2023-03-30 11:30:05 -04:00
Maas Lalani 0f0f8e9189 fix: detect stderr color profile 2023-03-27 12:00:24 -04:00
Maas Lalani e0bcab8608 fix: remove truecolor 2023-03-27 12:00:24 -04:00
Maas Lalani 95ddbdb416 feat: allow passing language to parse code 2023-03-24 13:40:37 -04:00
dependabot[bot] b6daeece02 chore(deps): bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 11:23:35 -04:00
Maas Lalani bb103c0a03
fix: show header only if not empty 2023-03-22 11:17:06 -04:00
Mikael Fangel 38521ff870 fix: correct wrong key combination for gum write in README.md
Fixes #312

### Changes:
 - Moves the `esc` over to the cancel option together with CTRL+c, so it reflects the current behaviour of the program.
2023-03-20 17:47:23 -04:00