function(command, arg) {
        var docs = [];
        docs.push('<strong><tt> &gt; ');
        docs.push(command.name);
        if (command.params && command.params.length > 0) {
            command.params.forEach(function(param) {
                if (param.defaultValue === undefined) {
                    docs.push(' [' + param.name + ']');
                }
                else {
                    docs.push(' <em>[' + param.name + ']</em>');
                }
            }, this);
        }
        docs.push('</tt></strong><br/>');

        docs.push(command.description ? command.description : '(No description)');
        docs.push('<br/>');

        if (command.params && command.params.length > 0) {
            docs.push('<ul>');
            command.params.forEach(function(param) {
                docs.push('<li>');
                docs.push('<strong><tt>' + param.name + '</tt></strong>: ');
                docs.push(param.description ? param.description : '(No description)');
                if (param.defaultValue === undefined) {
                    docs.push(' <em>[Required]</em>');
                }
                else if (param.defaultValue === null) {
                    docs.push(' <em>[Optional]</em>');
                }
                else {
                    docs.push(' <em>[Default: ' + param.defaultValue + ']</em>');
                }
                docs.push('</li>');
            }, this);
            docs.push('</ul>');
        }

        return new Hint(Status.VALID, docs.join(''), arg);
    }
function(command, arg) {
        var docs = [];
        docs.push('<strong><tt> &gt; ');
        docs.push(command.name);
        if (command.params && command.params.length > 0) {
            command.params.forEach(function(param) {
                if (param.defaultValue === undefined) {
                    docs.push(' [' + param.name + ']');
                }
                else {
                    docs.push(' <em>[' + param.name + ']</em>');
                }
            }, this);
        }
        docs.push('</tt></strong><br/>');

        docs.push(command.description ? command.description : '(No description)');
        docs.push('<br/>');

        if (command.params && command.params.length > 0) {
            docs.push('<ul>');
            command.params.forEach(function(param) {
                docs.push('<li>');
                docs.push('<strong><tt>' + param.name + '</tt></strong>: ');
                docs.push(param.description ? param.description : '(No description)');
                if (param.defaultValue === undefined) {
                    docs.push(' <em>[Required]</em>');
                }
                else if (param.defaultValue === null) {
                    docs.push(' <em>[Optional]</em>');
                }
                else {
                    docs.push(' <em>[Default: ' + param.defaultValue + ']</em>');
                }
                docs.push('</li>');
            }, this);
            docs.push('</ul>');
        }

        return new Hint(Status.VALID, docs.join(''), arg);
    }
function ( command , arg ) { var docs = [ ] ; docs . push ( '<strong><tt> &gt; ' ) ; docs . push ( command . name ) ; if ( command . params && command . params . length > 0 ) { command . params . forEach ( function ( param ) { if ( param . defaultValue === undefined ) { docs . push ( ' [' + param . name + ']' ) ; } else { docs . push ( ' <em>[' + param . name + ']</em>' ) ; } } , this ) ; } docs . push ( '</tt></strong><br/>' ) ; docs . push ( command . description ? command . description : '(No description)' ) ; docs . push ( '<br/>' ) ; if ( command . params && command . params . length > 0 ) { docs . push ( '<ul>' ) ; command . params . forEach ( function ( param ) { docs . push ( '<li>' ) ; docs . push ( '<strong><tt>' + param . name + '</tt></strong>: ' ) ; docs . push ( param . description ? param . description : '(No description)' ) ; if ( param . defaultValue === undefined ) { docs . push ( ' <em>[Required]</em>' ) ; } else if ( param . defaultValue === null ) { docs . push ( ' <em>[Optional]</em>' ) ; } else { docs . push ( ' <em>[Default: ' + param . defaultValue + ']</em>' ) ; } docs . push ( '</li>' ) ; } , this ) ; docs . push ( '</ul>' ) ; } return new Hint ( Status . VALID , docs . join ( '' ) , arg ) ; }
Provide some documentation for a command.
Provide some documentation for a command .