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 information about the FILEs (the current directory by default). Sort
entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
use a long listing format
-A (-A, --almost-all)
do not list implied . and ..
Or interactively like so:
[j@lianli ~]$ explain
Command: grep -rsI
grep searches the named input FILEs for lines containing a match to the given
PATTERN. If no files are specified, or if the file “-” is given, grep
searches standard input. By default, grep prints the matching lines. In
addition, the variant programs egrep and fgrep are the same as grep -E and
grep -F, respectively. These variants are deprecated, but are provided for
-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
-s (-s, --no-messages)
Suppress error messages about nonexistent or unreadable files.
Process a binary file as if it did not contain matching data; this is
equivalent to the --binary-files=without-match option.
The explain-command module is on npmjs.com and