zsh-users
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Niggling little problem with a theme
Date: Wed, 11 Dec 2019 16:18:49 -0600	[thread overview]
Message-ID: <D2D1ADCF-2F93-4750-B24A-7D43904895C7@easesoftware.com> (raw)
In-Reply-To: <6AC48A70-FD29-4E88-9BD1-B189922E2793@covisp.net>

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]



> On Dec 11, 2019, at 3:35 PM, Lewis Butler <lbutler@covisp.net> wrote:
> 
> I have a theme that is a modification of the candy.zsh-theme that uses an emoji for the prompt (I have a version for three different systems using the 🍰 and 🍎 for rPi and Macs as well as this one for my FreeBSD machines).
> 
> 👹 root@mail # cat ~/.oh-my-zsh/themes/bsd-candy.zsh-theme
> function toon {
>  echo -n "👹"
> }
> 
> 
> PROMPT=$'%{$fg[magenta]%}$(toon)%{$reset_color%} %{$fg_bold[green]%}%n@%m %{$fg_bold[blue]%}%#%{$reset_color%} '
> RPROMPT=$'%{$fg[blue]%}[%T] %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} ‘
> ---EOF
> 
> Works fine in nearly all cases, but occasionally when I am trying to edit a command line, the space after the prompt disappears and it makes it quite difficult to edit as the command that appears on the screen is shifted one character off.
> 
> Is this just an artifact of using multi-byte character?
> 
> (My terminal is normally macOS’s Terminal.app, but this issue also happens when I am on the console on the freeBSD machine.

The one experiment I would do is use “script” … its a command that drops you into another shell and captures all the input and output into a file called “typescript”.  Its on Mac and I’d be shocked if it isn’t on BSD.

The first question would be can you recreate the problem while inside script?  And if so, then get out of script (with ^D) and look at the typescript file and see if you can figure out the differences between the working case and the non-working case.  For example, are some characters in the non-working case not bring sent out or perhaps some characters are written in a different order.  Looking at the typescript file can be hard.  I use emacs for that which tends to not get confused.  Another choice is to pass it through od.

The other thought / question is if COMBINING_CHARS on or off makes any difference.  /etc/zshrc on Catalina sets that on some cases.


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2966 bytes --]

  reply	other threads:[~2019-12-11 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 21:35 Lewis Butler
2019-12-11 22:18 ` Perry Smith [this message]
2019-12-12  0:28 ` Bart Schaefer
2019-12-12 10:30   ` Lewis Butler
2019-12-12 10:44     ` Roman Perepelitsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D2D1ADCF-2F93-4750-B24A-7D43904895C7@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).