Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence CLI - Escape characters for runFrom commands

Jimmy Van (GLiNTECH)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2018

Hi,

I'm trying to run add some labels to a list of pages, however, I'm having a horrendous time with special characters. I had to change my credentials because CLI didn't like it :(

Anyway, I've got an existing page with descendants/descendents, and I want to add labels to them.

I start with:

-a getPageList --space WA --title "Weekend Away Initiatives" --descendents

I get back:

16 pages in list
Breakfast Chat (Fireside)
Customer Win Back Strategy
CWC (Welcome 3.0)
...

I then run:

-a runFromPageList --space WA --title "Weekend Away Initiatives" --descendents --common "-a addLabels --space WA --title \"@title@\" --labels endorsed" --limit 1

And I get an error:

Run: -a addLabels --space WA --title \CWC (Welcome 3.0)\ --labels endorsed

Error: Unexpected argument: (Welcome Error: Unexpected argument: 3.0)\

Client error: 1 actions failed

 

Have tried:

  • adding --special " "

  • no quotation marks, so --title @title@@

  • single quotation marks, escaped --title \\'@title@\\'

  • single quotation marks, not escaped --title @title@@

Also read:

https://community.atlassian.com/t5/Jira-questions/Problem-with-escaping-using-runFromIssueList-in-a-Confluence/qaq-p/419540, and https://bobswift.atlassian.net/wiki/spaces/ACLI/pages/41288169/Tips, but still no luck.

 

 

What should I be doing to handle the left parenthesis "(" character?

I can see other pages also have "+" and "-" in their names.

 

Running Windows 10 + Atlassian CLI 8.0.0, with Confluence 6.3.4.

1 answer

1 accepted

1 vote
Answer accepted
Jimmy Van (GLiNTECH)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2018

Got it, double quotes worked!

-a runFromPageList --space WA --title "Weekend Away Initiatives" --descendents --common "-a addLabels --space WA --title ""@title@"" --labels endorsed" --limit 1

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events