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:

$ npm install -g explain-command

Use it like so (user input in bold):

$ explain ls -lA

ls(1)
  list directory contents

  -l (-L)
    use a long listing format

  -A (-A, --ALMOST-ALL)
    do not list implied . and ..
                                           https://www.mankier.com/1/ls

Or interactively like so:

$ explain
Command: grep -rsI

grep(1)
  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.
                                         https://www.mankier.com/1/grep

Command: [return]
Bye!

The explain-command module is on npmjs.com and github.com.