Skip to content

Conversation

@kylesnowschwartz
Copy link

Summary

Adds two new flags to jira issue view for better control over output formatting:

  • --markdown — Raw markdown output without glamour terminal rendering
  • --no-emoji — Replace emoji with bracketed text labels

Motivation

The current output always processes through glamour, which adds ANSI formatting even with --plain. Users who want to pipe issue content to files, other tools, or LLMs need clean markdown without terminal artifacts.

The emoji in headers can also cause issues with:

  • Terminals/fonts that don't render emoji well
  • Text processing tools
  • Users who simply prefer text-only output

Examples

# Raw markdown (no glamour processing)
$ jira issue view ISSUE-1 --markdown

# Text labels instead of emoji
$ jira issue view ISSUE-1 --no-emoji

# Both combined for clean text output
$ jira issue view ISSUE-1 --markdown --no-emoji

Output with --no-emoji:

[Sub-task] [Backlog] Updated: Tue, 09 Dec 25  Assignee: Unassigned  Key: ATH-1665  Comments: 0  Linked: 0
# Issue Summary
Created: Tue, 09 Dec 25  Reporter: Name  Priority: Medium  Components: None  Labels: None  Watchers: 1

Test plan

  • go build ./... passes
  • go test ./internal/view/... passes
  • Manual testing with real Jira issues
  • Verified --markdown outputs clean markdown without ANSI codes
  • Verified --no-emoji replaces all emoji with text labels
  • Verified flags work together

Add a new --markdown flag to `jira issue view` that outputs raw markdown
without terminal formatting (glamour). This enables piping issue content
to files or other tools that expect plain markdown.

The existing --plain flag still processes output through glamour with
the 'notty' style, which adds formatting artifacts. The new --markdown
flag bypasses glamour entirely and outputs the raw markdown string.

Also ensures separator and footer text avoid ANSI escape codes when
--markdown is used.
Add a new --no-emoji flag that replaces emoji with bracketed text labels
in the issue header. This provides a cleaner output for users who prefer
text-only formatting or have terminal/font issues with emoji rendering.

Example output with --no-emoji:
[Sub-task] [Backlog] Updated: Tue, 09 Dec 25  Assignee: Unassigned  Key: ATH-1665
# Issue Summary
Created: Tue, 09 Dec 25  Reporter: Name  Priority: Medium  Components: None

Can be combined with --markdown for fully text-based markdown output.
@felipesilvadv
Copy link

I would love this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants