Notify to the slack channel using the incoming webhooks when the previous command has ended.
- Python 2
$ pip install cht
If you don't want to install cht with pip, download the main script.
# assume that ~/bin is included in $PATH $ curl https://raw.githubusercontent.com/suzuki-shunsuke/cht/master/cht.py -o ~/bin/cht $ chmod a+x ~/cht
$ <previous command>; cht $? [-u <url>] [-c <channel>] [-m <message>]
if you want to send the previous command's output to the slack channel, use pipe.
$ <previous command> | cht [-u <url>] [-c <channel>] [-m <message>]
You can use the following environment variables to set the channel and webhook url.
- CHT_URL: webhook url
- CHT_CHANNEL: channel name
Command line arguments are prefered to the environment variables.
- Fork (https://github.com/suzuki-shunsuke/cht/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Create a new Pull Request