Compare commits

..

No commits in common. "master" and "1.1.0" have entirely different histories.

3 changed files with 5 additions and 16 deletions

View File

@ -1,6 +1,4 @@
import cliutils, cstrutils, docopt, linenoise, os, osproc, sequtils, strutils import cliutils, docopt, linenoise, os, osproc, sequtils, strutils
import "./version.nim"
proc writeOutput(msg, errMsg: TaintedString, cmd: string): void = proc writeOutput(msg, errMsg: TaintedString, cmd: string): void =
if not msg.isEmptyOrWhitespace: stdout.writeLine(msg) if not msg.isEmptyOrWhitespace: stdout.writeLine(msg)
@ -13,7 +11,7 @@ Usage:
cmd_shell [--prepend-args] <cmd> [-- <args>...] cmd_shell [--prepend-args] <cmd> [-- <args>...]
""" """
# Parse arguments # Parse arguments
let args = docopt(usage, version = CMD_SHELL_VERSION) let args = docopt(usage, version = "1.1.0")
let cmdPrompt = $args["<cmd>"] let cmdPrompt = $args["<cmd>"]
let cmd = '"' & cmdPrompt & '"' let cmd = '"' & cmdPrompt & '"'
@ -28,7 +26,7 @@ Usage:
var line = readLine(cmdPrompt & "> ") var line = readLine(cmdPrompt & "> ")
while line != nil and cmpIgnoreCase(line, "exit") != 0: while line != nil:
if args["--prepend-args"]: if args["--prepend-args"]:
discard exec(cmd & " " & argsForCmd & " " & $line, "", [], nil, {poUsePath, poEvalCommand}, writeOutput) discard exec(cmd & " " & argsForCmd & " " & $line, "", [], nil, {poUsePath, poEvalCommand}, writeOutput)
else: else:

View File

@ -1,6 +1,6 @@
# Package # Package
version = "1.2.0" version = "1.1.0"
author = "Jonathan Bernard" author = "Jonathan Bernard"
description = "Wrapper around CLI commands (passing input as arguments)." description = "Wrapper around CLI commands (passing input as arguments)."
license = "MIT" license = "MIT"
@ -8,12 +8,4 @@ bin = @["cmd_shell"]
# Dependencies # Dependencies
requires @[ requires @["nim >= 0.16.1", "cliutils"]
"nim >= 0.16.1",
"cliutils",
"https://git.jdb-labs.com/jdb/update-nim-package-version"
]
task updateVersion, "Update the version of this package.":
exec "update_nim_package_version cmd_shell 'version.nim'"

View File

@ -1 +0,0 @@
const CMD_SHELL_VERSION* = "1.2.0"