Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions workspace/w13_music_proj/src/main/scala/music/commands.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object Command:
def apply(cmd: String, args: Seq[String]): String =
all.find(_.str == cmd) match
case Some(c) => c(args)
case None => s"Unkown command: $cmd\nType ? for help."
case None => s"Unknown command: $cmd\nType ? for help."

def loopUntilExit(nextLine: () => String): Unit =
val line = nextLine()
Expand All @@ -29,7 +29,7 @@ object Command:
object Help extends Command("?", "print help"):
def apply(args: Seq[String]): String = args match
case Seq() => Command.allHelpTexts
case Seq(cmd) => Command.find(cmd).map(_.help).getOrElse(s"Unkown: $cmd")
case Seq(cmd) => Command.find(cmd).map(_.help).getOrElse(s"Unknown: $cmd")
case _ => s"Usage: $str [cmd]"

object Quit extends Command(":q", "quit this app"):
Expand Down