/* sbt -- Simple Build Tool
* Copyright 2010 Mark Harrah
*/package sbt
import complete.HistoryCommands
import scala.annotation.tailrec
import java.io.File
importPath._
objectBasicCommandStrings{valHelpCommand = "help"valExit = "exit"valQuit = "quit"/** The command name to terminate the program.*/valTerminateAction: String = ExitdefhelpBrief = (HelpCommand, "Displays this help message or prints detailed help on requested commands (run 'help <command>').")defhelpDetailed = HelpCommand+"""
Prints a help summary.
"""+HelpCommand+""" <command>
Prints detailed help for command <command>.
"""+HelpCommand+""" <regular expression>
Searches the help according to the provided regular expression.
"""defHistoryHelpBrief = (HistoryCommands.Start->"History command help. Lists and describes all history commands.")defhistoryHelp = Help(Nil, (HistoryHelpBrief+:HistoryCommands.descriptions).toMap, Set(HistoryCommands.Start))defexitBrief = "Terminates the build."defReadCommand = "<"defReadFiles = " file1 file2 ..."defReadDetailed =
ReadCommand+ReadFiles+"""
Reads the lines from the given files and inserts them as commands.
All empty lines and lines that start with '#' are ignored.
If a file does not exist or is not readable, this command fails.
All the lines from all the files are read before any of the commands
are executed. Thus, if any file is not readable, none of commands
from any of the files (even the existing ones) will be run.
You probably need to escape this command if entering it at your shell."""defApplyCommand = "apply"defApplyDetailed =
ApplyCommand+""" [-cp|-classpath <classpath>] <module-name>*
Transforms the current State by calling <module-name>.apply(currentState) for each listed module name.
Here, currentState is of type sbt.State.
If a classpath is provided, modules are loaded from a new class loader for this classpath.
"""defRebootCommand = "reboot"defRebootDetailed =
RebootCommand+""" [full]
This command is equivalent to exiting sbt, restarting, and running the
remaining commands with the exception that the JVM is not shut down.
If 'full' is specified, the boot directory (`~/.sbt/boot` by default)
is deleted before restarting. This forces an update of sbt and Scala
and is useful when working with development versions of sbt or Scala."""defMulti = ";"defMultiBrief = (Multi+" <command> ("+Multi+" <command>)*", "Runs the provided semicolon-separated commands.")defMultiDetailed =
Multi+" command1 "+Multi+""" command2 ...
Runs the specified commands."""defAppendCommand = "append"defAppendLastDetailed =
AppendCommand+""" <command>
Appends 'command' to list of commands to run.
"""valAliasCommand = "alias"defAliasDetailed =
AliasCommand+"""
Prints a list of defined aliases.
"""+AliasCommand+""" name
Prints the alias defined for `name`.
"""+AliasCommand+""" name=value
Sets the alias `name` to `value`, replacing any existing alias with that name.
Whenever `name` is entered, the corresponding `value` is run.
If any argument is provided to `name`, it is appended as argument to `value`.
"""+AliasCommand+""" name=
Removes the alias for `name`."""defShell = "shell"defShellDetailed = "Provides an interactive prompt from which commands can be run."defClearOnFailure = "--"defOnFailure = "-"defOnFailureDetailed =
OnFailure+""" command
Registers 'command' to run when a command fails to complete normally.
Only one failure command may be registered at a time, so this command
replaces the previous command if there is one.
The failure command resets when it runs once, so it must be added
again if desired."""defIfLast = "iflast"defIfLastCommon = "If there are no more commands after this one, 'command' is run."defIfLastDetailed =
IfLast+""" <command>
"""+IfLastCommonvalContinuousExecutePrefix = "~"defcontinuousDetail = "Executes the specified command whenever source files change."defcontinuousBriefHelp = (ContinuousExecutePrefix+" <command>", continuousDetail)}