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

Created on 11 May 2019  路  5Comments  路  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

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:

alt="Image of Hyper Terminal with the % in the first line"
style="float: left; margin-right: 10px;" />

alt="Image of Hyper Terminal with the % in the first line"
style="float: left; margin-right: 10px;" />

Most helpful comment

This should fix it: Adding unsetopt PROMPT_SP to .zshrc

Update: Closing because of duplicate

All 5 comments

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

duplicate #3586

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.

@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.

This should fix it: Adding unsetopt PROMPT_SP to .zshrc

Update: Closing because of duplicate

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alejandrofloresm picture alejandrofloresm  路  3Comments

weabot picture weabot  路  3Comments

legomushroom picture legomushroom  路  3Comments

anthonyettinger picture anthonyettinger  路  3Comments

laur1s picture laur1s  路  3Comments