Вопрос по terminal, node.js – Как вы редактируете существующий текст (и перемещаете курсор) в терминале?

18

Error: User Rate Limit Exceededsome-command --helpError: User Rate Limit Exceededafter it was already printed out in the terminal.

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededstdoutError: User Rate Limit ExceededstdinError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

$ node app.js
> App.User.all()
=> []

Error: User Rate Limit Exceeded=> []Error: User Rate Limit Exceeded

$ node app.js
> App.User.all()
=> [#<User id:1>, #<User id:2>...]

Error: User Rate Limit ExceededApp.User.all(_c)).

Error: User Rate Limit Exceeded

Ваш Ответ

2   ответа
0

41

https://github.com/asyncly/cdir/blob/223fe0039fade4fad2bb08c2f7affac3bdcf2f89/cdir.js#L24 http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html

http://ascii-table.com/ansi-escape-sequences-vt-100.php

Position the Cursor: \033[<L>;<C>H or \033[<L>;<C>f (puts the cursor at line L and column C)

Move the cursor up N lines: \033[<N>A Move the cursor down N lines: \033[<N>B Move the cursor forward N columns: \033[<N>C Move the cursor backward N columns: \033[<N>D Clear the screen, move to (0,0): \033[2J Erase to end of line: \033[K Save cursor position: \033[s Restore cursor position: \033[u
Error: User Rate Limit Exceeded\033Error: User Rate Limit Exceeded\x1bError: User Rate Limit Exceeded\u001b.
Error: User Rate Limit ExceededThe latter two codes are NOT honoured by many terminal emulators. The only ones that I'm aware of that do are xterm and nxterm - even though the majority of terminal emulators are based on xterm code.

Похожие вопросы