All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sbt.BasicCommandStrings.scala Maven / Gradle / Ivy

The newest version!
/*
 * sbt
 * Copyright 2023, Scala center
 * Copyright 2011 - 2022, Lightbend, Inc.
 * Copyright 2008 - 2010, Mark Harrah
 * Licensed under Apache License 2.0 (see LICENSE)
 */

package sbt

import sbt.util.Level
import sbt.internal.util.complete.HistoryCommands

object BasicCommandStrings {
  val HelpCommand: String = "help"
  val CompletionsCommand: String = "completions"
  val Exit: String = "exit"
  val Shutdown: String = "shutdown"
  val Quit: String = "quit"
  val TemplateCommand: String = "new"
  val TemplateCommandAlias: String = "init"
  val Cancel: String = "cancel"

  /** The command name to terminate the program.*/
  val TerminateAction: String = Exit

  def helpBrief: (String, String) =
    (
      HelpCommand,
      s"Displays this help message or prints detailed help on requested commands (run '$HelpCommand ')."
    )
  def helpDetailed: String = s"""$HelpCommand

	Prints a help summary.

$HelpCommand 

	Prints detailed help for command .

$HelpCommand 

	Searches the help according to the provided regular expression.
"""

  def CompletionsDetailed: String =
    "Displays a list of completions for the given argument string (run 'completions ')."
  def CompletionsBrief: (String, String) = (CompletionsCommand, CompletionsDetailed)

  def templateBrief: (String, String) = (TemplateCommand, "Creates a new sbt build.")
  def templateDetailed: String =
    TemplateCommand + """ [--options]