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

Clear progress bar on ipfs cat exit #1516

Merged
merged 1 commit into from
Jul 28, 2015
Merged

Clear progress bar on ipfs cat exit #1516

merged 1 commit into from
Jul 28, 2015

Conversation

rht
Copy link
Contributor

@rht rht commented Jul 24, 2015

Close #1345

like ipfs add, but not wget/curl.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
@jbenet jbenet added the status/in-progress In progress label Jul 24, 2015
@jbenet
Copy link
Member

jbenet commented Jul 27, 2015

This LGTM. I'll try it on OSX. (wish we could test this sort of thing)

thoughts @whyrusleeping ?

@whyrusleeping
Copy link
Member

this is a pattern i've been seeing more and more frequently, needing to capture the EOF 'event' of a reader and do something to it, whether its close the httpResponse and check for a trailer error, or clear a line of output... I wonder if theres a nice composition for that to happen 'generically'.

Anyways, these changes look good to me, although i wish it was testable

@rht
Copy link
Contributor Author

rht commented Jul 27, 2015

Ok I will put an asciinema as an evidence. But this only proves that it works on my terminal (urxvt, which emulates vt102).

The chance is high on os x (iterm2 or terminal.app): https://en.wikipedia.org/wiki/ANSI_escape_code

@rht
Copy link
Contributor Author

rht commented Jul 27, 2015

@jbenet
Copy link
Member

jbenet commented Jul 28, 2015

@rht that looks really nice :) 👍

jbenet added a commit that referenced this pull request Jul 28, 2015
Clear progress bar on `ipfs cat` exit
@jbenet jbenet merged commit 870d850 into ipfs:master Jul 28, 2015
@jbenet jbenet removed the status/in-progress In progress label Jul 28, 2015
@rht rht deleted the progressbar branch July 28, 2015 02:36
@jbenet jbenet modified the milestone: IPFS 0.3.6 Jul 28, 2015
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

Successfully merging this pull request may close these issues.

3 participants