Allow single-letter aliases

Fixes #1074
This commit is contained in:
Eugene Yokota 2018-09-14 00:38:24 -04:00
parent e30a481585
commit 9ffae4e31f
3 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,7 @@ object Cross {
token(CrossCommand <~ OptSpace) flatMap { _ =>
(token(Parser.opt("-v" <~ Space)) ~ token(matched(state.combinedParser))).map {
case (verbose, command) => CrossArgs(command, verbose.isDefined)
} & spacedFirst(CrossCommand)
}
}
private def crossRestoreSessionParser: Parser[String] = token(CrossRestoreSessionCommand)

View File

@ -1,2 +1,3 @@
addCommandAlias("demo-success", "run true")
addCommandAlias("demo-failure", "run false")
addCommandAlias("z", "scalaVersion")

View File

@ -1,2 +1,3 @@
> demo-success
-> demo-failure
> +z