jira-cli
jira-cli copied to clipboard
Newlines don't work with --format
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.
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
-