File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 . name ( "count-containing-lines-words-characters" )
88 . description ( "Counts lines, words or characters in a file (or all files) inside a directory" )
99 . option ( "-l, --line" , "The number of lines in each file" )
10- . argument ( "<path>" , "The file path to process" ) ;
10+ . argument ( "<path... >" , "The file path to process" ) ;
1111
1212program . parse ( ) ;
1313
@@ -40,7 +40,7 @@ if (pathInfo.isFile()) {
4040 if ( options . line ) {
4141 console . log ( `${ stats . lines } ${ path } ` ) ;
4242 } else {
43- console . log ( `${ stats . lines } ${ stats . words } ${ stats . chars } ${ path } ` ) ;
43+ console . log ( `${ stats . lines } ${ stats . words } ${ stats . characters } ${ path } ` ) ;
4444 }
4545} else if ( pathInfo . isDirectory ( ) ) {
4646 const files = await fs . readdir ( path ) ;
@@ -52,7 +52,7 @@ if (pathInfo.isFile()) {
5252 if ( options . line ) {
5353 console . log ( `${ stats . lines } ${ filePath } ` ) ;
5454 } else {
55- console . log ( `${ stats . lines } ${ stats . words } ${ stats . chars } ${ filePath } ` ) ;
55+ console . log ( `${ stats . lines } ${ stats . words } ${ stats . characters } ${ filePath } ` ) ;
5656 }
5757 }
5858}
You can’t perform that action at this time.
0 commit comments