mirror of https://github.com/sbt/sbt.git
Merge pull request #6769 from naferx/remove-old-lastgrep
Remove deprecated command last-grep
This commit is contained in:
commit
f12a199a1a
|
|
@ -626,11 +626,6 @@ object BuiltinCommands {
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
|
||||||
@deprecated("Use `lastGrep` instead.", "1.2.0")
|
|
||||||
def oldLastGrep: Command =
|
|
||||||
lastGrepCommand(OldLastGrepCommand, oldLastGrepBrief, oldLastGrepDetailed, { s =>
|
|
||||||
lastGrepParser(s)
|
|
||||||
})
|
|
||||||
|
|
||||||
def lastGrep: Command =
|
def lastGrep: Command =
|
||||||
lastGrepCommand(LastGrepCommand, lastGrepBrief, lastGrepDetailed, lastGrepParser)
|
lastGrepCommand(LastGrepCommand, lastGrepBrief, lastGrepDetailed, lastGrepParser)
|
||||||
|
|
@ -643,9 +638,6 @@ object BuiltinCommands {
|
||||||
): Command =
|
): Command =
|
||||||
Command(name, briefHelp, detail)(parser) { (s: State, sks: (String, Option[AnyKeys])) =>
|
Command(name, briefHelp, detail)(parser) { (s: State, sks: (String, Option[AnyKeys])) =>
|
||||||
{
|
{
|
||||||
if (name == OldLastGrepCommand)
|
|
||||||
s.log.warn(deprecationWarningText(OldLastGrepCommand, LastGrepCommand))
|
|
||||||
|
|
||||||
(s, sks) match {
|
(s, sks) match {
|
||||||
case (s, (pattern, Some(sks))) =>
|
case (s, (pattern, Some(sks))) =>
|
||||||
val (str, _, display) = extractLast(s)
|
val (str, _, display) = extractLast(s)
|
||||||
|
|
|
||||||
|
|
@ -70,23 +70,10 @@ $PrintCommand <task>
|
||||||
def pluginsDetailed = pluginsBrief // TODO: expand
|
def pluginsDetailed = pluginsBrief // TODO: expand
|
||||||
|
|
||||||
val LastCommand = "last"
|
val LastCommand = "last"
|
||||||
val OldLastGrepCommand = "last-grep"
|
|
||||||
val LastGrepCommand = "lastGrep"
|
val LastGrepCommand = "lastGrep"
|
||||||
val ExportCommand = "export"
|
val ExportCommand = "export"
|
||||||
val ExportStream = "export"
|
val ExportStream = "export"
|
||||||
|
|
||||||
val oldLastGrepBrief =
|
|
||||||
(OldLastGrepCommand, "Shows lines from the last output for 'key' that match 'pattern'.")
|
|
||||||
val oldLastGrepDetailed =
|
|
||||||
s"""$OldLastGrepCommand <pattern>
|
|
||||||
Displays lines from the logging of previous commands that match `pattern`.
|
|
||||||
|
|
||||||
$OldLastGrepCommand <pattern> [key]
|
|
||||||
Displays lines from logging associated with `key` that match `pattern`. The key typically refers to a task (for example, test:compile). The logging that is displayed is restricted to the logging for that particular task.
|
|
||||||
|
|
||||||
<pattern> is a regular expression interpreted by java.util.Pattern. Matching text is highlighted (when highlighting is supported and enabled).
|
|
||||||
See also '$LastCommand'."""
|
|
||||||
|
|
||||||
val lastGrepBrief =
|
val lastGrepBrief =
|
||||||
(LastGrepCommand, "Shows lines from the last output for 'key' that match 'pattern'.")
|
(LastGrepCommand, "Shows lines from the last output for 'key' that match 'pattern'.")
|
||||||
val lastGrepDetailed =
|
val lastGrepDetailed =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue