5 ms·
While this is interesting, I will probably find this too much of work to type in all the stuff again with examples. Throwing a not-so-random extension idea - ma
by Sreyanth 8y ago
While this is interesting, I will probably find this too much of work to type in all the stuff again with examples. Throwing a not-so-random extension idea - may be a tool to go through the weird commands in my bash history and suggest me to explain the commands which I just used?
Right now, I usually grep the man pages to search for things relevant to specific context. Something like,
man find | grep -i --color=always -C10 "file name"
Worked well in most cases. So, for figuring out how to send a POST request, I would try
man curl | grep -C10 --color=always POST
If that bombs, I would then immediately try
curl --help | grep --color=always POST
If I end up using certain set of flags frequently, I will set up a bash command like most others. Or, make a weird joke out of the flags, for example,
ls -lionshit
- nazri1 8y agoA good joke consists of an introduction, which establishes the story to be told and gracefully segues into the punchline. Your post here demostrate that very well sir.
- seealso 8y agoSee also https://github.com/alphapapa/mangle https://github.com/alphapapa/mangle
- banku_brougham 8y agoHow could it check that the command from bash history successfully ran? I often iterate about 10 times to get the right command, so that's 9 errors in the history.
- Sreyanth 8y agoMay be extend a bit further to check if the return value is 0? Can be accessed via `$?` in most non-Windows systems.