Skip to content

Commit

Permalink
set prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
joprice committed Jun 21, 2016
1 parent c69c091 commit da69c87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/dynamite/Reader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ trait Reader {
def readLine(): String

def setPrompt(prompt: String): Unit

}

class JLineReader(reader: ConsoleReader) extends Reader {
Expand All @@ -33,7 +34,8 @@ class JLineReader(reader: ConsoleReader) extends Reader {

def readLine(): String = reader.readLine()

def setPrompt(prompt: String): Unit = reader.setPrompt(">")
def setPrompt(prompt: String): Unit = reader.setPrompt(prompt)

def terminalWidth: Int = reader.getTerminal.getWidth

}

0 comments on commit da69c87

Please sign in to comment.