slack-cli icon indicating copy to clipboard operation
slack-cli copied to clipboard

Escaping char on pipe input is inconsistent. Double quotes are not escaped but newlines are.

Open agentgt opened this issue 7 years ago • 0 comments

When you pipe contents to slack cli it will do the proper escaping for newlines yet does not for ".

For now I'm using a sed script to remove it but I'm probably missing other characters?

#try.txt has newlines and some " (double quotes)
 cat try.txt | sed 's/"/\\"/g' | slack chat send --channel '#engineering' --pretext 'Blah:'

I saw #62 where someone explained you have to do the escaping yourself but if that is the case how come newline is handled but double quote is not? Its really confusing because I'm not sure what chars are handled and what isn't.

agentgt avatar Jul 23 '18 12:07 agentgt