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

View File

@ -1,6 +1,6 @@
# Package
version = "1.2.0"
version = "1.1.0"
author = "Jonathan Bernard"
description = "Wrapper around CLI commands (passing input as arguments)."
license = "MIT"
@ -8,12 +8,4 @@ bin = @["cmd_shell"]
# Dependencies
requires @[
"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'"
requires @["nim >= 0.16.1", "cliutils"]

View File

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