Hyper: Realtime stdout creates new lines for progressive updates rather than replacing lines

Created on 9 Jan 2017  ·  11Comments  ·  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: macOS 10.12.2

  • Hyper.app version: 1.0.1
  • Link of a Gist with the contents of your .hyper.js: N/A, happens regardless of .hyper.js
  • Relevent information from devtools _(CMD+SHIFT+I on Mac OS, CTRL+SHIFT+I elsewhere)_: N/A
  • The issue is reproducible in vanilla Hyper.app: 👍🏻

Issue

First off: I’ve searched the issues here for anything that might be a duplicate, but as I don’t 100% know the correct terminology, I may have missed something.

I’ve noticed that some CLI apps which generate realtime output involving ‘status updates’ (in my example below, gsutil for GCP) will end up generating new lines for every ‘progress’ update instead of updating the progress line. For example, in iTerm, when I run a process to sync a directory on my machine with a directory in my Google Cloud storage, I get a new line for every file uploaded, but there’s only one stdout line for the overall sync progress, which is updated in realtime — this is the behaviour I expect:

iTerm

Conversely, when I run the same operation in Hyper, a new stdout line is generated for every progress update:

Hyper

I’ve noticed this with other CLI apps, e.g. npm, yarn, etc, where progress is piped in realtime to stdout.

Could this be fixed? Would love to not have stdout be so noisy for these sorts of things. Happy to provide any extra info if needed. Thanks!

Most helpful comment

This is still an issue in 1.4.3. Any updates?

All 11 comments

Just for reference, here’s another occasion where this happens. This is while downloading and installing packages from brew:

screen shot 2017-01-16 at 19 34 21

(The hashes are used as a progress bar with the progress % being displayed on the right. This line should be reprinted on each update rather than creating a new line for each update as shown above.)

Looks like the same problem was happening in #601

This appears to be fixed in Hyper 1.2.1. Thanks!

This seems to be happening again. Not sure which version it reappeared in, but here’s an example:

Webpack build running in iTerm:
image

Same, running in latest Hyper (1.3.2, macOS 10.12.4):
image

Update: I've just noticed something flaky about this — if I increase the width of my Hyper window, the stdout seems to update the single line as it should. Screenshot below shows what happens on initially running my Webpack build, and the line at the bottom is the line that started to stream updates after resizing:

image

A colleague of mine (@rmhowe) recently noticed similar behaviour on vertical splits — so I'm thinking this now has something to do with the width of the window/split compared to the length of the output, perhaps?

This is still an issue in 1.4.3. Any updates?

I'm seeing the same issue on 1.4.8 running on Manjaro: when the width is narrower than the output line, it creates new lines. Resizing the window so the output fits entirely on one line fixes it.

This problem is particularly bothersome for those who use vi mode bindings (j/k) to browse history.

@deleteme what is your hyper version?
If you are using v1.4.8, can you install our last canary by adding updateChannel: 'canary' in your config file and retry?

It's fixed in canary, thank you! (before, after)

Thank you for your confirmation :pray:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  ·  3Comments

eoinmurray picture eoinmurray  ·  3Comments

dbkaplun picture dbkaplun  ·  3Comments

alejandrofloresm picture alejandrofloresm  ·  3Comments

daenuprobst picture daenuprobst  ·  3Comments