NPM module: explain-command

npm install explain-command, then run “explain” on your command line.

Jackson Pauls By Jackson Pauls

Following on from our bash function to explain commands from the command line, here’s a new npm module with the same functionality:

[j@lianli ~]$ sudo npm install -g explain-command

Use it like so (user input in bold):

[j@lianli ~]$ explain ls -lA

  list directory contents

  -l (-L)
    use a long listing format

  -A (-A, --ALMOST-ALL)
    do not list implied . and ..

Or interactively like so:

[j@lianli ~]$ explain
Command: grep -rsI

  print lines matching a pattern

  -r (-R, --RECURSIVE)
    Read all files under each directory, recursively, following
    symbolic links only if they are on the command line. Note that if
    no file operand is given, grep searches the working directory. This
    is equivalent to the -D RECURSE option.

  -s (-S, --NO-MESSAGES)
    Suppress error messages about nonexistent or unreadable files.

  -I (-I)
    Process a binary file as if it did not contain matching data; this
    is equivalent to the --BINARY-FILES=WITHOUT-MATCH option.

Command: [return]

The explain-command module is on and