tilix icon indicating copy to clipboard operation
tilix copied to clipboard

Random % sign when opening tilix with zsh as shell

Open scott-tancock opened this issue 6 years ago • 4 comments

Problem Description

When opening tilix with zsh as the default shell (or by setting custom command to /bin/zsh in the profile settings), a % sign with inverted color (as through it's been highlighted) appears on the first line, with the prompt appearing on the second line:

Screenshot from 2019-09-05 11-54-02

Steps to Reproduce

  • Set default shell to zsh with chsh or usermod -s /bin/zsh $USER
    • Alternatively, Tilix -> Preferences -> Default profile -> Command -> Run a custom command instead of my shell: /bin/zsh
  • Open tilix

Expected Outcome

  • Prompt on line 1

Actual outcome

  • % sign on line 1, colours inverted
  • Prompt on line 2
  • If using oh-my-zsh, the % sign only appears on the first tilix terminal opened.
    • If you close all tilix terminals, the % sign will appear on the next one you open (since it will be the 'first opened' terminal)

Reproducability

  • I have confirmed this is not an issue with my .zshrc by copying .zshrc to .zshrc.bak and then touching .zshrc (bug still occurs with empty .zshrc).
  • I have confirmed this is not an issue with bash.
  • I have confirmed this does not occur with other terminals (gnome-terminal tested)

scott-tancock avatar Sep 05 '19 11:09 scott-tancock

I have this exact issue as well but with Hyper.js

Viibrant avatar Mar 24 '20 14:03 Viibrant

I had the same (zsh) after changing a password of a SSH key using ssh-keygen -p. Rebooting debian (WSL) fixed it.

hibuna avatar Oct 06 '24 11:10 hibuna

Does not seem like an issue with tilix, but a feature of zsh: PROMPT_EOL_MARK tells if previous command did or did not have a trailing newline.

Setting PROMPT_EOL_MARK='' shall fix the issue.

algj avatar Oct 09 '24 11:10 algj

unsetopt PROMPT_SP

For me this is the proper fix. Using PROMPT_EOL_MARK='' gets rid of the %, but leaves a newline in the cases where you would have gotten a %. Where as unsetopt PROMPT_SP behaves as expected.

https://superuser.com/questions/645599/why-is-a-percent-sign-appearing-before-each-prompt-on-zsh-in-windows

edgan avatar Jan 02 '25 19:01 edgan