mirror of https://github.com/sbt/sbt.git
Fix parser for new command
This commit is contained in:
parent
954e744408
commit
f29932e594
|
|
@ -72,13 +72,17 @@ object BasicCommands {
|
|||
def templateCommand = Command.make(TemplateCommand, templateBrief, templateDetailed)(templateCommandParser)
|
||||
def templateCommandParser(state: State) =
|
||||
{
|
||||
val p = token(Space).* ~> repsep(StringBasic, token(Space))
|
||||
val p = (token(Space) ~> repsep(StringBasic, token(Space))) | (token(EOF) map { case _ => Nil })
|
||||
val trs = (state get templateResolvers) match {
|
||||
case Some(trs) => trs.toList
|
||||
case None => Nil
|
||||
}
|
||||
applyEffect(p)({ inputArg =>
|
||||
val arguments = inputArg.toList ++ state.remainingCommands
|
||||
val arguments = inputArg.toList ++
|
||||
(state.remainingCommands.toList match {
|
||||
case "shell" :: Nil => Nil
|
||||
case xs => xs
|
||||
})
|
||||
trs find { tr =>
|
||||
tr.isDefined(arguments.toArray)
|
||||
} match {
|
||||
|
|
|
|||
Loading…
Reference in New Issue