1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

REPL: exit to exit

This commit is contained in:
Alexander Medvednikov
2019-06-29 22:56:21 +02:00
parent f4f1622528
commit a2b80d5b3d
2 changed files with 2 additions and 11 deletions

View File

@ -851,7 +851,7 @@ fn run_repl() []string {
exit(1)
}
println('V $Version')
println('Use Ctrl-D to exit')
println('Use Ctrl-D or `exit` to exit')
println('For now you have to use println() to print values, this will be fixed soon\n')
file := TmpPath + '/vrepl.v'
mut lines := []string
@ -862,7 +862,7 @@ fn run_repl() []string {
continue
}
line = line.trim_space()
if line == '' {
if line == '' || line == 'exit' {
break
}
// Save the source only if the user is printing something,