Add `vorpal.ui.clear` command to API
See original GitHub issuehi,
I implemented a clear command in one of my vorpal application following your answers in this post http://stackoverflow.com/questions/8813142/clear-terminal-window-in-node-js-readline-shell/32871585#32871585?newreg=0fd7e6b366544c72b82496cd4c077973
The problem is that the cursor lost in the console after executing the clear command, as the screenshots below:
Before clear,

After clear,

Notice that the grey cursor had gone.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Vorpal
Vorpal has built-in tabbed autocompletion for your commands and options, persistent command history, piping and automated help pages.
Read more >How can I add variadic support to options of a Vorpal application
Currently developing a vorpal application and am trying to add variadic support to one of my commands. However adding the variadic syntax to ......
Read more >@moleculer/vorpal - npm
With a simple and powerful API, Vorpal opens the door to a new breed of rich, immersive CLI environments like cash and wat....
Read more >dthree/vorpal - Gitter
Is there an easy way to add a confirmation to a command with vorpal? ... .command('target', 'Set or clear target for session.') .option('-s...
Read more >vorpal Alternatives - Node.js Command Line Utilities | LibHunt
Create a .js file and add the following: const vorpal = require('vorpal')(); vorpal .command('foo', ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mamboer: It’s ANSI escape codes. A breakdown of
\u001b[2J\u001b[0;0His:\u001bis the escape character, together with[it becomes a Control Sequence Introducer (CSI)CSI 2Jis the sequence for clearing the entire screenCSI 0;0His the sequence for moving the cursor to row 0, column 0Hey guys am using this command to ‘clean’ the screen , especially after a messy execution :
vorpal.command('clean').action(function (args,cb) {process.stdout.write ("\u001B[2J\u001B[0;0f");cb();});