From ff7384fced17630f26e27f1f56e7b4fca43c2217 Mon Sep 17 00:00:00 2001 From: naf Date: Wed, 29 Dec 2021 21:17:05 -0500 Subject: [PATCH] Remove deprecated command --- main/src/main/scala/sbt/Main.scala | 8 -------- .../main/scala/sbt/internal/CommandStrings.scala | 13 ------------- 2 files changed, 21 deletions(-) diff --git a/main/src/main/scala/sbt/Main.scala b/main/src/main/scala/sbt/Main.scala index 6bb147f7d..e45987944 100644 --- a/main/src/main/scala/sbt/Main.scala +++ b/main/src/main/scala/sbt/Main.scala @@ -626,11 +626,6 @@ object BuiltinCommands { s } - @deprecated("Use `lastGrep` instead.", "1.2.0") - def oldLastGrep: Command = - lastGrepCommand(OldLastGrepCommand, oldLastGrepBrief, oldLastGrepDetailed, { s => - lastGrepParser(s) - }) def lastGrep: Command = lastGrepCommand(LastGrepCommand, lastGrepBrief, lastGrepDetailed, lastGrepParser) @@ -643,9 +638,6 @@ object BuiltinCommands { ): Command = Command(name, briefHelp, detail)(parser) { (s: State, sks: (String, Option[AnyKeys])) => { - if (name == OldLastGrepCommand) - s.log.warn(deprecationWarningText(OldLastGrepCommand, LastGrepCommand)) - (s, sks) match { case (s, (pattern, Some(sks))) => val (str, _, display) = extractLast(s) diff --git a/main/src/main/scala/sbt/internal/CommandStrings.scala b/main/src/main/scala/sbt/internal/CommandStrings.scala index 7c50f506e..439cdc295 100644 --- a/main/src/main/scala/sbt/internal/CommandStrings.scala +++ b/main/src/main/scala/sbt/internal/CommandStrings.scala @@ -70,23 +70,10 @@ $PrintCommand def pluginsDetailed = pluginsBrief // TODO: expand val LastCommand = "last" - val OldLastGrepCommand = "last-grep" val LastGrepCommand = "lastGrep" val ExportCommand = "export" val ExportStream = "export" - val oldLastGrepBrief = - (OldLastGrepCommand, "Shows lines from the last output for 'key' that match 'pattern'.") - val oldLastGrepDetailed = - s"""$OldLastGrepCommand - Displays lines from the logging of previous commands that match `pattern`. - -$OldLastGrepCommand [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. - - is a regular expression interpreted by java.util.Pattern. Matching text is highlighted (when highlighting is supported and enabled). - See also '$LastCommand'.""" - val lastGrepBrief = (LastGrepCommand, "Shows lines from the last output for 'key' that match 'pattern'.") val lastGrepDetailed =