1
0
mirror of https://gitea.com/gitea/tea.git synced 2024-12-04 14:46:40 -05:00
tea/modules/interact
Norwin bbb287e29e markdown: dont emit ansi sequences when not emitting to tty (#491)
Allows generating a plain text version of an issue (i.e. without colors and other terminal formatting) when storing stdout in a file.
```
tea issue --comments 1 > issue1.txt
```

`IsInteractive()` had to be moved to avoid a recursive import chain.

---

In the future, it would be nice to also respect the `--output` flag. This flag is currently designed for tabular output, but we could add more supported values like `markdown` `ansi`, `plain` to it

Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/491
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: delvh <dev.lh@web.de>
2022-09-14 02:35:15 +08:00
..
comments.go markdown: dont emit ansi sequences when not emitting to tty (#491) 2022-09-14 02:35:15 +08:00
issue_create.go Fetch all items where needed. (#475) 2022-04-08 03:44:16 +08:00
login.go [Refactor] unexport config.Config var & move login tasks to task module (#288) 2020-12-12 21:28:37 +08:00
milestone_create.go Allow editing multiline prompts with external text editor (#429) 2021-10-14 22:36:08 +08:00
prompts.go Allow editing multiline prompts with external text editor (#429) 2021-10-14 22:36:08 +08:00
pull_create.go tea pr create: make local repo optional (#393) 2021-09-22 23:48:21 +08:00
pull_review.go Allow editing multiline prompts with external text editor (#429) 2021-10-14 22:36:08 +08:00