Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Remember and update a session/line only #48

Open
pundoo opened this issue Jun 6, 2020 · 1 comment
Open

[FR] Remember and update a session/line only #48

pundoo opened this issue Jun 6, 2020 · 1 comment

Comments

@pundoo
Copy link

pundoo commented Jun 6, 2020

Test case :

const logUpdate = require('log-update');
let logCount = logUpdate.create(process.stdout);

logCount('count: 1');
logUpdate('foo');
setInterval(() => {
    logCount('count: 2');
}, 2000);

In this scenario, the second logCount replaces 'foo'.

Possible to remember and update the first line and keep the second line intact?

@rauschma
Copy link

rauschma commented Feb 25, 2024

My use case is similar: Fill in status (✅ or ❌) after a file was fully processed.

=== file1.js ✅

Status output 1a
Status output 1b

=== file2.js ❌

Error output 2a
Error output 2b

In other words – I’d like to:

  • Save the cursor position.
  • Log text (potentially a lot = Terminal might scroll).
  • Update the status at the saved cursor position.

Maybe that’s not even possible with the current Terminal standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants