Like pbcopy/pbpaste for Mattermost
A config file will be created on first run. $HOME/.config/mmpost/config.json
{
"server": "",
"pat": "",
"team": "",
"channel": "",
"maxlines": 50,
"syntax": "",
"filename": ""
}
Account Setings -> Security -> Personal Access Tokens -> Create New Token.
Less than maxlines with a syntax
cat file.go | mmpost -syntax go
More than maxlines (will be an attachment)
cat file.go | mmpost -syntax go --filename file.go
See config flags
mmpost -h
File over 16300 bytes required to be an attachment so you have to use --filename
cat file.go | mmpost -syntax go --filename file.go