From 0ec3770767dd24254d137ac45fe34897ec0443b8 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 23 Jan 2014 15:35:50 +0400 Subject: [PATCH] doc: readline document TTY utils fix #6933 --- doc/api/readline.markdown | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index bcfbe4f5901..1fa08a1905b 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -281,3 +281,23 @@ line interface: process.exit(0); }); +## readline.cursorTo(stream, x, y) + +Move cursor to the specified position in a given TTY stream. + +## readline.moveCursor(stream, dx, dy) + +Move cursor relative to it's current position in a given TTY stream. + +## readline.clearLine(stream, dir) + +Clears current line of given TTY stream in a specified direction. +`dir` should have one of following values: + +* `-1` - to the left from cursor +* `1` - to the right from cursor +* `0` - the entire line + +## readline.clearScreenDown(stream) + +Clears the screen from the current position of the cursor down.