danielgtaylor/nesh — pull request #13 by ccheever (2014-03-13 21:28:08+00:00)
Title: Adding nesh-doc plugin as a default plugin, automatically enabled

Shows some documentation for an expression; invoke it by typing Ctrl-Q
inline after an expression

Ex.
```
nesh> process.on
[Function] (type, listener)
```

Hit Ctrl-Q twice to see more information, ex. the entire source code in the
case of a function.

Ex.
```
nesh> process.on
[Function] (type, listener)
function (type, listener) {
if (isSignal(type) &&
!signalWraps.hasOwnProperty(type)) {
var Signal = process.binding('signal_wrap').Signal;
var wrap = new Signal();
...
```

You can also invoke it with the `.doc` keyword.

Ex.
```
nesh> .doc process.on
[Function] (type, listener)
```

This works for all objects, but is most useful for functions and sometimes
classes. I'm planning to write up a document about how to annotate your
code in a way that the doc module can understand if you want to make your
source more readable that way, but doing that isn't required for this
plugin to be useful. The most useful thing is usually just quick access to
what parameters a function expects.