jira-cli icon indicating copy to clipboard operation
jira-cli copied to clipboard

Newlines don't work with --format

Open Llammissar opened this issue 7 years ago • 1 comments

Default jira-cli view is nice, but it doesn't show the description or any comments. The latter can be grabbed with --comments, but to get the description (arguably the most important part of any bug), you need to use --format="%description". And that's all you get; it's not nicely formatted like the others.

If you want all three? That's three separate invocations and inconvenient. Theoretically, you should be able be replicate this with a single --format, but in practice, you can't actually put newlines into the format string and have them render properly.

Llammissar avatar Jan 17 '18 18:01 Llammissar

newlines seem to work fine - you just need to supply a string with a literal newline.

e.g. in fishshell, running:

> jira-cli view \
  --search-jql 'summary ~ \'translator service\' and status != Done' \
  --format '''t: %summary
  k: %key
  -'''

produces output like:

t: mumble mumble mumble
k: XXX-1234
-
t: more mumble
k: XXX-1235
-

jeremy-w avatar Apr 29 '19 19:04 jeremy-w