* feat: add OSExec helper function for running exec.Cmds
* chore: for now, un-expose WrapExecCommand
* chore: move exec struff into its own file
* chore(exec): better name for Exec func that wraps exec.Cmd (thanks, @toby)
* docs: improve godoc on tick and every
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: small improvements
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: add loop examples for Tick/Every in GoDocs
* docs: small wording adjustments
* docs: small copy edits
Co-authored-by: Christian Rocha <christian@rocha.is>
* feat(keys): add support for shift/ctrl+arrow keys
* chore(keys): use sequences for shift/ctrl arrow keys
* feat(keys): support ctrl+shift+arrow keys
* chore(keys): use sequences for alt+arrows
* feat(keys): add support for arrow key combinations with alt modifiers
* fix(keys): remove an extreaneous check
* feat(keys): add support for urxvt arrow keys with modfiers
* feat(keys): add support for arrow keys in DECCKM mode
* docs(keys): expand on comment about ctrl+backtick
* chore(keys): migrate various bindings to sequences
* Minor comment improvements to the input parser
Co-authored-by: Bwahharharrr <yitang@tutanota.com>
* fix: replace keySP with working KeySpace
* test: update test to meet new reqs
* fix: fix test looking for 'space'
* fix(keys): set type to KeySpace when sending a space
* docs(keys): comments
Co-authored-by: Christian Rocha <christian@rocha.is>
* add: program.ReleaseTerminal and RestoreTerminal to re-use input & terminal
* chore(examples): add altscreen toggling to exec demo
* chore: put low-level altscreen stuff alongside other screen funcs
* docs: edit GoDocs for ReleaseTerminal and RestoreTerminal
* feat(renderer): add internal Msg renderMsg to immediately repaint
* fix: repaint instantly on RestoreTerminal
* fix: restore the altscreen state when restoring the terminal
* feat: implement Cmd-based API for blocking *exec.Cmds
* feat: allow Exec to return custom messages
* feat: allow Exec to be run without a callback
* fix: separate parameters for exec.Command examples
* fix: error message would get printed over by prompt in exec example
* fix: ignore signals while child process is running
* feat: allow to execute other things besides exec.Commands (#280)
* feat: allow to execute other things besides exec.Commands.
* fix: lint issues
* fix: renames, examples
* fix: callback type should be exported
* docs(exce): tiny ExecCommand doc comment correction
* chore(exec): break out Cmd for clarity's sake in example
* fix(exec): give the terminal a moment to catch up if exiting altscreen
* docs(exec): tidy up doc comments
* chore(exec): disambiguate methods for restoring the terminal state vs input
Co-authored-by: Christian Rocha <christian@rocha.is>
Co-authored-by: Carlos A Becker <caarlos0@gmail.com>
`errMsg(err)` -> `errMsg{err}`
Just noticed this while reading over the tutorial docs and figured I'd throw up a quick PR to address it.
Really enjoying the tooling so far, thank you for creating it!
* feat: update x/sys
current version breaks builds for windows/arm64
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: examples go.sum
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: tutorials go.sum
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Race condition bug: Start() is called in a new gorotuine, then Send(). If the
Send happens before the msgs channel is allocated, the message is dropped.
Instead allocate the channel in the constructor, so msgs is never nil.
Signed-off-by: Christian Stewart <christian@paral.in>