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

After upgrading to version 3, starting Hyper (with ZSH) results in a '%' being printed to the console #3658

Closed
2 tasks done
itsandreramon opened this issue May 11, 2019 · 5 comments

Comments

@itsandreramon
Copy link

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

Issue

After upgrading to version 3 of Hyper, a % is printed to the console when using oh-my-zsh. I don't think that this is an issue with oh-my-zsh since it behaves normally when using the standard Terminal app. My friend also has this problem and I saw it live when he was updating to the newest version. It looks like this:

Image of Hyper Terminal with the % in the first line

Image of Hyper Terminal with the % in the first line

@z336
Copy link

z336 commented May 11, 2019

I have a similar issue after the upgrade as well, except I just see a cursor block and not %

macOS 10.14.4
Hyper 3.0.2 (stable)
Oh My ZSH

Hyper:
image

Terminal:
image

@Kirow
Copy link

Kirow commented May 11, 2019

duplicate #3586

@DaneTheory
Copy link
Contributor

It seems like this is a zsh specific issue. It has to do with partial line preservation and, theoretically, should output to either % or # depending on the user running the prompt (i.e. user = %, root = #). For some reason when the user's shell is zsh on Hyper's initial init, something is being run that creates a line in the prompt that does not end in a newline. I've been working on a PR that fixes this for Hyper, but haven't found an elegant solution yet. In the interim, edit your ~/.zshrc file to include PROMPT_EOL_MARK="". Then, either restart Hyper or run source on your ~/.zshrc. This removes the % sign. However, it does not clear the newline the % held. Running clear or reset will set the prompt's cursor back at the top.

@DaneTheory
Copy link
Contributor

@rauchg @chabou @leo @matheuss since you all seem to be the top contributors for Hyper, perhaps you could best aid in crafting a solution for this problem by providing a bit of development context.
Describe the lifecycle of Hyper. From Initial launch => loading configs => render of prompt => etc. => until final "ready" state where the user can begin interacting with the prompt. If you could provide the location of the code that executes each state, that would be helpful as well. Cheers.

@itsandreramon
Copy link
Author

itsandreramon commented May 26, 2019

This should fix it: Adding unsetopt PROMPT_SP to .zshrc

Update: Closing because of duplicate

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

4 participants