Improvements and WIP wc
This commit is contained in:
parent
94c57b1da2
commit
b7e5108379
10 changed files with 60 additions and 16 deletions
6
echo.nim
6
echo.nim
|
|
@ -1,11 +1,11 @@
|
|||
import cligen, sequtils
|
||||
import common
|
||||
|
||||
proc main(strings:seq[string], newline=true) =
|
||||
proc main(strings:seq[string], newline=true, nospaces=false) =
|
||||
if newline:
|
||||
writeLine(stdout, strings.foldl(a & " " & b))
|
||||
writeLine(stdout, strings.foldl(a & (if nospaces: "" else: " ") & b))
|
||||
else:
|
||||
write(stdout, strings.foldl(a & " " & b))
|
||||
write(stdout, strings.foldl(a & (if nospaces: "" else: " ") & b))
|
||||
flushFile(stdout)
|
||||
|
||||
dispatch(main, version=("version", nimbaseVersion))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue