How to use the cli.withInput function in cli

To help you get started, we’ve selected a few cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / cli / cli-tests.ts View on Github external
var output_file = function(file: string) {
    cli.withInput(file, function (line, sep, eof) {
        if (!eof) {
            cli.output(line + sep);
        } else if (cli.args.length) {
            output_file(cli.args.shift());
        }
    });
};
github node-js-libs / cli / examples / cat.js View on Github external
var output_file = function (file) {
    cli.withInput(file, function (line, sep, eof) {
        if (!eof) {
            cli.output(line + sep);
        } else if (cli.args.length) {
            output_file(cli.args.shift());
        }
    });
};