azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

[Feature Request] - `variable-group create` to support multiline `--description`

Open kevin-george-ul opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. When creating a variable-group, I would like to add a multi-line description. I have tried the following

# Using \n: Results in "line 1\n Line2"
az pipelines variable-group create --name 'myVariableGroup' --variables 'hello=world' --description "line 1\n Line2"

# Using \\n: Results in "line 1\\n Line2"
az pipelines variable-group create --name 'myVariableGroup' --variables 'hello=world' --description "line 1\n Line2"

# Using `n: Results in "line 1"
az pipelines variable-group create --name 'myVariableGroup' --variables 'hello=world' --description "line 1`nLine2"

# Using --description twice: Results in "line2"
az pipelines variable-group create --name 'myVariableGroup' --variables 'hello=world' --description "line 1" --description "Line2"

# Using `n: Results in error - I suspect the `n is treated as an enter / end of command. 
az pipelines variable-group create --name 'myVariableGroup' --description "line 1`nLine2" --variables 'hello=world' 

Describe the solution you'd like I would like the --description to honor either \n or support multi-line comments in any way.

Additional context Add any other context or screenshots about the feature request here.

kevin-george-ul avatar Nov 03 '21 17:11 kevin-george-ul

@kevin-george-ul , I was doing some testing. I observed that the description is as below when I add multi-line comment from the portal.

image

Lddeiva avatar Dec 17 '21 10:12 Lddeiva

#1058 - Related.

Lddeiva avatar Dec 17 '21 10:12 Lddeiva

Thanks @Lddeiva for looking into and linking the releated issue.

If you tried to create a variable group with the exact same description i.e line1\nline2\nline3\nline4. In the protal it will render as line1\nline2\nline3\nline4 instead of linebreaks.

az pipelines variable-group create --name 'myVariableGroup' --variables 'hello=world' --description "line1\nline2\nline3\nline4"

kevin-george-ul avatar Dec 17 '21 10:12 kevin-george-ul