slack-cli
slack-cli copied to clipboard
Escaping char on pipe input is inconsistent. Double quotes are not escaped but newlines are.
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.