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

Using \u001B[2J\u001B[0;0f to avoid special character in Hyper with --clear flag #140

Merged
merged 1 commit into from
May 23, 2018
Merged

Conversation

filipposarzana
Copy link
Contributor

@filipposarzana filipposarzana commented May 22, 2018

Using \u001B[2J\u001B[0;0f to avoid special character in Hyper with --clear flag

It works in every other terminal, tested 👍

What was the problem/Ticket Number

There is some issue with special character if --clear is specified

cleannotworking
errornotworking

How does this solve the problem?

Using \u001B[2J\u001B[0;0f native method solves the issue.
The first code \u001B[2J instructs the terminal to clear itself, and the second one \u001B[0;0f forces the cursor back to position 0,0.

cleanworking
errorworking

How to duplicate the issue

  1. Pass --clear option

@filipposarzana filipposarzana changed the title Using console.clear() to avoid special character in terminal with --clear flag Using \u001B[2J\u001B[0;0f to avoid special character in Hyper with --clear flag May 22, 2018
@filipposarzana
Copy link
Contributor Author

Hi @rizowski i've tried to figure out why the coverage/coveralls was failing but actually I'm unable to find a response to it 🤔

Actually I edited only the file i've touched and it seems breaking anyway. Could you give me a hint about it? I would be happy to contribute somehow if it's needed 👍

@rizowski
Copy link
Owner

@filipposarzana Thanks for the PR. I actually need to upgrade eslint-watch to support Node V6. I try to follow what eslint is currently supporting which is what caused some of your test errors earlier. Node 4 doesn't include console.clear. As for the coveralls issue. It's possible it have it setup incorrectly currently. I have been having problems with it reporting the status. But I am ok with pulling this in anyways if you are good with the code.

@filipposarzana
Copy link
Contributor Author

Yeah, I've reverted usage of console.clear with something more reliable on more environments, but I'm ok with the code, since it's working with all terminals.

Once you upgrade node version, I could make another PR to upgrade the code.

Thanks 👍

Let me know 😉

@rizowski rizowski merged commit bca288a into rizowski:master May 23, 2018
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.

None yet

2 participants