FAQ
I want to write a CLI program, but I got a little problem

var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

I wrote this simple program , how to hide cursor in CLI?
--
Best regards,

Jason Green
桂林

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Ryan Schmidt at Apr 24, 2012 at 2:33 pm

    On Apr 24, 2012, at 09:28, jason.桂林 wrote:

    I want to write a CLI program, but I got a little problem

    var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

    I wrote this simple program , how to hide cursor in CLI?
    That's a shell programming question, not a node question.

    http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Jason.桂林 at Apr 24, 2012 at 2:35 pm
    Many node CLI program.

    2012/4/24 Ryan Schmidt <google-2010@ryandesign.com>:
    On Apr 24, 2012, at 09:28, jason.桂林 wrote:

    I want to write a CLI program, but I got a little problem

    var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

    I wrote this simple program ,  how to hide cursor in CLI?
    That's a shell programming question, not a node question.

    http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en


    --
    Best regards,

    Jason Green
    桂林

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Ryan Schmidt at Apr 24, 2012 at 2:36 pm

    On Apr 24, 2012, at 09:33, Ryan Schmidt wrote:
    On Apr 24, 2012, at 09:28, jason.桂林 wrote:

    I want to write a CLI program, but I got a little problem

    var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

    I wrote this simple program , how to hide cursor in CLI?
    That's a shell programming question, not a node question.

    http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html
    I guess there are node modules to help you do this. Here's an example of someone using cursor.hide() and cursor.show(), where cursor is obtained from require('ansi').

    https://gist.github.com/2299368

    There's also node-ncurses which has showCursor.

    https://github.com/mscdex/node-ncurses

    etc.

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Jason.桂林 at Apr 24, 2012 at 5:34 pm
    Thanks very much

    2012/4/24 Ryan Schmidt <google-2010@ryandesign.com>:
    On Apr 24, 2012, at 09:33, Ryan Schmidt wrote:
    On Apr 24, 2012, at 09:28, jason.桂林 wrote:

    I want to write a CLI program, but I got a little problem

    var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

    I wrote this simple program ,  how to hide cursor in CLI?
    That's a shell programming question, not a node question.

    http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html
    I guess there are node modules to help you do this. Here's an example of someone using cursor.hide() and cursor.show(), where cursor is obtained from require('ansi').

    https://gist.github.com/2299368

    There's also node-ncurses which has showCursor.

    https://github.com/mscdex/node-ncurses

    etc.

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en


    --
    Best regards,

    Jason Green
    桂林

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedApr 24, '12 at 2:28p
activeApr 24, '12 at 5:34p
posts5
users2
websitenodejs.org
irc#node.js

2 users in discussion

Jason.桂林: 3 posts Ryan Schmidt: 2 posts

People

Translate

site design / logo © 2017 Grokbase