sos is a command line tool for quickly searching error messages on StackOverflow. It parses the output of a given command for error messages, and displays the link to relevant posts on StackOverflow.
Run
make
make install
This will install sos into /usr/local/bin, and create a .sosrc file in your home directory.
Run sos <command> (eg. sos "python tests/divide_by_zero.py") to detect error messages in the output of <command>. The ~/.sosrc file contains the regex patterns that are used to identify error messages. NOTE: each regex pattern must contain exactly one capture group.
Run sos -o <command> to automatically open the StackOverflow links in your default browser.
Run make to build binary, make DEBUG=1 to build with debug statements, make clean to remove build files.
- Parse
stdoutandstderrfor error messages - Display StackOverflow link for error messages
- Open StackOverflow links automatically in browser
- Read regex from
.sosrcfile - Add custom config file option
- Refactor
- Include tags in search
- Show search query
- Add examples
- Add tests
- Distribute somehow
- Support interactive commands like
pythoninterpreter (need to unbuffer pseudoterminal)