zsh-users
 help / color / mirror / code / Atom feed
From: Lewis Butler <lbutler@covisp.net>
To: Zsh Users <zsh-users@zsh.org>
Subject: Prompts with emoji issues
Date: Tue, 12 May 2020 23:08:01 -0600	[thread overview]
Message-ID: <EFE1F0B2-BBFF-4E0A-A3E3-D2ACC85D0671@covisp.net> (raw)

I have the following theme:

# cat bsd-candy.zsh-theme
function toon {
  echo -n “👹"
}

PROMPT=$'%{$fg[magenta]%}$(toon)%{$reset_color%} %{$fg_bold[green]%}%n@%m %{$fg_bold[blue]%}%#%{$reset_color%} ‘
#

This works fine in nearly all cases, but often when editing long lines, the space after the # in the prompt gets eaten, and editing the line will have an offset of one character.

I think it only happens when the line length exceeds the terminal application’s width.

Am I doing something wrong here or is this an issue with my terminal emulator (Terminal.app in macOS in this case).

(I have a similar theme fo my Mac commanline that is nearly identical and has the same issues:

# cat apple-candy.zsh-theme
function toon {
  echo -n ""
}

PROMPT=$'%{$fg[magenta]%}$(toon)%{$reset_color%} %{$fg_bold[green]%}%n@%m %{$fg_bold[blue]%}%#%{$reset_color%} ‘
#

-- 
ɹןʇnqן
<mailto:lbutler@covisp.net>
tel:+1.303.219.0564




             reply	other threads:[~2020-05-13  5:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  5:08 Lewis Butler [this message]
2020-05-13  6:52 ` Bart Schaefer
2020-05-13 16:47   ` Roman Perepelitsa
2020-05-13 21:14   ` Lewis Butler
2020-05-13 21:26     ` Lewis Butler
2020-05-14  3:54       ` Bart Schaefer
2020-05-14  9:50         ` Lewis Butler
2020-05-14 12:13           ` Lewis Butler
2020-05-14 17:55           ` Bart Schaefer
2020-05-14 18:18             ` Lewis Butler
2020-05-17 19:50               ` Lewis Butler
2020-05-17 20:39                 ` Bart Schaefer
2020-05-18  3:41                 ` Bart Schaefer
2020-05-18 12:23                 ` Lewis Butler
2020-05-19  0:26                   ` Bart Schaefer
2020-05-19 13:21                     ` Lewis Butler
2020-05-19 13:54                       ` Roman Perepelitsa
2020-05-19 22:05                         ` Lewis Butler
2020-05-19 23:20                           ` Daniel Shahaf
2020-05-20  5:16                           ` 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=EFE1F0B2-BBFF-4E0A-A3E3-D2ACC85D0671@covisp.net \
    --to=lbutler@covisp.net \
    --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).