4 ms·
See https://github.com/jeroenjanssens/data-science-toolbox/blob/master/explain https://github.com/jeroenjanssens/data-science-toolbox/blob/... for a bash script
by jeroenjanssens 13y ago
See https://github.com/jeroenjanssens/data-science-toolbox/blob/master/explain https://github.com/jeroenjanssens/data-science-toolbox/blob/... for a bash script that interfaces with explainshell.com.
I wrote this script a while ago. I just needed to update the request because the API had changed a bit since then. Please note that it depends on the scrape tool in the same repository, which in turn depends on the python packages lxml and cssselect. But once you have that set up, you can explain commands from the shell! :-)
- staunch 13y agoSounds like a job for a little statically compiled Go program :-)
- Flimm 13y agoThe trouble with that approach is that you have to escape special characters: $ explain cat filename | sort # won't work $ explain 'cat filename | sort' # presumably would work I wonder if the best approach is to make `explain` behave like a prompt. If there was some way it could inherit bash's command history, even better $ explain explain> cat filename | sort