Commit Graph

3 Commits

Author SHA1 Message Date
Yann Büchau d03068dba7
Add -n option to prevent newline after emoji (#12)
ci/woodpecker/push/woodpecker Pipeline was successful Details
Adds another commandline option `-n` to the application which prevents
newlines from being added at the end of each output.
Disabled by default.

Co-authored-by: Marty Oehme <marty.oehme@gmail.com>
2022-09-27 21:01:44 +02:00
Marty Oehme 7e8fc0c51a
Add ability to execute multiple command options
Can combine command options (-c, -t, -e) in any way to simultaneously
clip, type and/or echo the picked results.
Still defaults to clipping, as before.

If a custom default command is given with `BEMOJI_DEFAULT_CMD` env var,
then invoking bemoji without any command option will invoke this
command. Otherwise, the other commands are added to the default given
command.

Additionally, refactor echo command to mirror other commands
Both typing and clipping simply invoke the corresponding program
function while echo had an extra role so far. This adjusts the echo
command to also work the same way.
2022-08-06 11:46:06 +02:00
Marty Oehme 28aa2aa522
🧪 Add tests for clipping, echo and typing command
Added a simple test for each of the base command options: echo, type,
clip. It uses custom commands set through environment options so does
not yet test the actual default command logic (finding a typer,
clipper), that is still a TODO.

Also split tests into tests concerning commands of the program and tests
concerning the directory settings and options of the program, to avoid
ending up with a single test file spanning hundreds of lines.
2022-08-06 10:02:34 +02:00