On Tue, 3 Mar 2015 01:00:35 -0500 Eric Andrew Lewis <eric.andrew.le...@gmail.com> wrote:
> In short, I'd like to make a program that does this: > > $ explain "rm -rf *" > rm -rf * > ??? rm remove files or directories > ??? -r remove directories and their contents recursively > ??? -f ignore nonexistent files, never prompt > ??? * Remove (unlink) files matching this text pattern. Apolgies for the OT turn I'm about to take, but you happen to have tickled one of the reasons I decided to learn troff in the first place. 30 years ago I used a shell that in many ways was superior to Unix shells then and now. If you typed a command with appropriate options, it executed it without fuss. If you typed a command and simply hit Enter (or Help?) it brought up a form to fill out. Once completed, you pressed OK (or something) and the command was then executed equivalently. Just imagine having a form-based interface for tar or dd. Over time you learned shortcuts to things you did all the time, and could always fall back on the form for help. The interaction was much nicer than bringing up a man page and then remembering what to do. That shell didn't do globbing in the form, but that would be a natural (optional) feature of a Unix version. I thought I would write a "form" tool that would work a little like your explainshell. I thought it might generate an HTML form, invoke lynx, and process HTTP POST. It would rely on a database of options gleaned from the documentation. Anyone could either add to the database or fix up the documentation to be understandable to the doc parser. I lost interest because ISTM anyone who might use it would prefer KDE or somesuch, and because the state of manpage documentation left a lot to be desired for that intended (re)purpose. But if you have similar ideas, I thought I'd mention it because you're in the HTML neighborhood and an active form would represent a novel improvement instead of a re-tread of static manpages. We now return you to your regularly scheduled programming. --jkl