mks-integrity

PTC Integrity edit multiline field in issue


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


Solution

  • 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.