Skip to content

Commit e0c62c8

Browse files
weswinderbcoe
authored andcommitted
doc: edit help example to align with actual output (#1271)
1 parent bc0ee40 commit e0c62c8

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

docs/examples.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ var argv = require('yargs')
285285
.demandOption(['f'])
286286
.help('h')
287287
.alias('h', 'help')
288-
.epilog('copyright 2015')
288+
.epilog('copyright 2019')
289289
.argv;
290290

291291
var fs = require('fs');
@@ -302,25 +302,38 @@ s.on('end', function () {
302302
````
303303

304304
***
305-
$ node line_count.js count
305+
$ node line_count.js
306306
Usage: line_count.js <command> [options]
307307

308308
Commands:
309-
count Count the lines in a file
309+
line_count.js count Count the lines in a file
310310

311311
Options:
312-
-f, --file Load a file [required]
313-
-h, --help Show help [boolean]
312+
--version Show version number [boolean]
313+
-f, --file Load a file [required]
314+
-h, --help Show help [boolean]
314315

315316
Examples:
316317
line_count.js count -f foo.js count the lines in the given file
317318

318-
copyright 2015
319+
copyright 2019
320+
321+
Missing required argument: f
322+
323+
$ node line_count.js count
324+
line_count.js count
325+
326+
Count the lines in a file
327+
328+
Options:
329+
--version Show version number [boolean]
330+
-f, --file Load a file [required]
331+
-h, --help Show help [boolean]
319332

320-
Missing required arguments: f
333+
Missing required argument: f
321334

322335
$ node line_count.js count --file line_count.js
323-
26
336+
25
324337

325338
$ node line_count.js count -f line_count.js
326-
26
339+
25

0 commit comments

Comments
 (0)