Skip to content

Commit 74df435

Browse files
Merge pull request #11370 from riiswa/feature/quit_alias
Add :exit as alias of :quit in REPL
2 parents a27ffeb + b0d6455 commit 74df435

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/repl/ParseResult.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ case object Reset extends Command {
9090
/** `:quit` exits the repl */
9191
case object Quit extends Command {
9292
val command: String = ":quit"
93+
val alias: String = ":exit"
9394
}
9495

9596
/** `:help` shows the different commands implemented by the Dotty repl */
@@ -121,6 +122,7 @@ object ParseResult {
121122

122123
private val commands: List[(String, String => ParseResult)] = List(
123124
Quit.command -> (_ => Quit),
125+
Quit.alias -> (_ => Quit),
124126
Help.command -> (_ => Help),
125127
Reset.command -> (_ => Reset),
126128
Imports.command -> (_ => Imports),

0 commit comments

Comments
 (0)