Skip to content

Commit fef04a6

Browse files
authored
Merge pull request #468 from benjyz/repl
simplify repl
2 parents 8678751 + 17acb60 commit fef04a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

repl.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ func repl(phase Phase) {
126126
reader := NewReader(runeReader, "<repl>")
127127

128128
for {
129+
namespace := GLOBAL_ENV.CurrentNamespace().Name.ToString(false)
129130
if noReadline {
130-
print(GLOBAL_ENV.CurrentNamespace().Name.ToString(false) + "=> ")
131+
print(namespace + "=> ")
131132
} else {
132-
runeReader.(*LineRuneReader).Prompt = (GLOBAL_ENV.CurrentNamespace().Name.ToString(false) + "=> ")
133+
runeReader.(*LineRuneReader).Prompt = (namespace + "=> ")
133134
}
134135
if processReplCommand(reader, phase, parseContext, replContext) {
135136
saveReplHistory(rl, historyFilename)

0 commit comments

Comments
 (0)