diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-11-09 09:07:22 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 16:07:22 +0100 |
commit | c1664f93b0024b558ff359f13ab6cd2e6c1b5cc7 (patch) | |
tree | 731b28344b508781f15872cfba44f09fc0bdae71 /compiler/msgs.nim | |
parent | 53eca459f1d96c710238be95bd3fb048b336f2f3 (diff) | |
download | Nim-c1664f93b0024b558ff359f13ab6cd2e6c1b5cc7.tar.gz |
new: `nim -e:cmd` to run a command directly; also fixes #15731 (#15687)
* new: `nim -i cmd` * rename -i to -e (for eval); consistent with majority of other programing languages * `nim e -e:cmd` now works; bugfix: `echo cmd | nim e -` now works * honor --betterRun * address comments * --eval alias for -e (replaces undocumented --eval which was a noop) * --eval now defaults to e (nimscript) instead of r * address comment: remove -e, only keep --eval * address comment * fixup * Update compiler/nimconf.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r-- | compiler/msgs.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 0f5879ff6..7b691323f 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -523,6 +523,7 @@ proc liMessage*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string, let s = if isRaw: arg else: getMessageStr(msg, arg) if not ignoreMsg: let loc = if info != unknownLineInfo: conf.toFileLineCol(info) & " " else: "" + # we could also show `conf.cmdInput` here for `projectIsCmd` var kindmsg = if kind.len > 0: KindFormat % kind else: "" if conf.structuredErrorHook != nil: conf.structuredErrorHook(conf, info, s & kindmsg, sev) |