Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
f2ccce1f17 |
@ -1,8 +1,8 @@
|
||||
import cliutils, linenoise, os, osproc, sequtils, strutils
|
||||
|
||||
proc writeOutput(msg, errMsg: TaintedString, cmd: string): void =
|
||||
if msg != nil: stdout.writeLine(msg)
|
||||
if errMsg != nil: stderr.writeLine(errMsg)
|
||||
if not msg.isEmptyOrWhitespace: stdout.writeLine(msg)
|
||||
if not errMsg.isEmptyOrWhitespace: stderr.writeLine(errMsg)
|
||||
|
||||
when isMainModule:
|
||||
|
||||
@ -27,4 +27,3 @@ when isMainModule:
|
||||
discard exec(cmd & " " & args & $line, "", [], nil, {poUsePath, poEvalCommand}, writeOutput)
|
||||
historyAdd(line)
|
||||
line = readLine(cmdPrompt & "> ")
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Wrapper around CLI commands (passing input as arguments)."
|
||||
license = "MIT"
|
||||
|
Reference in New Issue
Block a user