From b0d6455c1c108361b94a3942e9b0e88af38c93c7 Mon Sep 17 00:00:00 2001 From: riiswa Date: Wed, 10 Feb 2021 13:41:35 +0100 Subject: [PATCH] Add :exit as alias of :quit in REPL --- compiler/src/dotty/tools/repl/ParseResult.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/src/dotty/tools/repl/ParseResult.scala b/compiler/src/dotty/tools/repl/ParseResult.scala index f7b20843a28d..352c568533c4 100644 --- a/compiler/src/dotty/tools/repl/ParseResult.scala +++ b/compiler/src/dotty/tools/repl/ParseResult.scala @@ -90,6 +90,7 @@ case object Reset extends Command { /** `:quit` exits the repl */ case object Quit extends Command { val command: String = ":quit" + val alias: String = ":exit" } /** `:help` shows the different commands implemented by the Dotty repl */ @@ -121,6 +122,7 @@ object ParseResult { private val commands: List[(String, String => ParseResult)] = List( Quit.command -> (_ => Quit), + Quit.alias -> (_ => Quit), Help.command -> (_ => Help), Reset.command -> (_ => Reset), Imports.command -> (_ => Imports),