function displayPrompt( repl, preserveCursor ) {
	var len;
	var re;
	var ws;

	// Avoid displaying a prompt if the REPL is currently in paging mode...
	if ( repl._ostream.isPaging || repl._isCapturingKeybinding ) {
		return;
	}
	len = repl._cmd.length;
	if ( len === 0 ) {
		if ( repl._padding && repl._count >= 0 ) {
			repl._ostream.write( repeat( '\n', repl._padding ) );
		}
		repl._rli.setPrompt( repl._prompt() );
		repl._rli.prompt( preserveCursor );
		return;
	}
	repl._rli.setPrompt( '' );
	repl._rli.prompt( preserveCursor );

	// Prepend the leading whitespace of the previous line:
	re = leadingWhitespaceRegExp();
	ws = repl._cmd[ len-1 ].match( re );
	if ( ws ) {
		repl._rli.write( ws[ 0 ] );
	}
}
Displays a command prompt.

@private
@param {REPL} repl - REPL instance
@param {boolean} [preserveCursor=false] - boolean indicating whether to preserve the cursor position
@returns {void}