2

How do I add a line break while editing a field via CLI?

im editissue --field=comment="first line\nsecond line" ISSUE_NUMBER just saves the whole string in one line with a "\n"

The comment field is a multiline field and it is possible to insert a line break in GUI.

OS is Windows 7, integrity version is 10.6

Federico
  • 138
  • 1
  • 12

1 Answers1

1

I think it has more to do with the shell rather than the im utility itself. ANSI-C Quoting appears to work on Git Bash/Windows:

im editissue --field=FieldName=$'test\ntest' 123456

The $ causes the \n character in ''-delimited text to be interpolated - see this question for more details.

alex
  • 6,818
  • 9
  • 52
  • 103