wish icon indicating copy to clipboard operation
wish copied to clipboard

feat: add wish.Command and wish.Cmd

Open caarlos0 opened this issue 1 year ago • 1 comments

The wish-exec example with vim worked because neovim was not using STDERR.

Bubbletea doesn't have a concept of stdout and stderr, just output, so tea.ExecProcess sets the exec.Cmd stderr to os.Stderr.

This would fail for bash, for instance.

This also introduces a wish.Cmd type and a wish.Command function to properly set up a wish.Cmd based on ssh.Session (and optionally a Pty), which can then be used with tea.Exec.

Finally, it adds to the wish-exec example, including the s key to run a shell (bash).

closes #228

caarlos0 avatar Jan 22 '24 12:01 caarlos0

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e5d20f5) 76.58% compared to head (98030fa) 77.23%.

:exclamation: Current head 98030fa differs from pull request most recent head 10790a8. Consider uploading reports for the commit 10790a8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
+ Coverage   76.58%   77.23%   +0.64%     
==========================================
  Files          17       19       +2     
  Lines         914      940      +26     
==========================================
+ Hits          700      726      +26     
  Misses        160      160              
  Partials       54       54              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 22 '24 13:01 codecov[bot]