2

I using zsh. However, the command search history feature(ctrl-r) is giving me issues. Specifically, the text gets garbled. Everything executes correctly regardless, but UX it's a bad experience.

Using the same cloud, this issue exists in my client terminals... both in linux system with urxvt terminal and also in wsl terminal.

How can I fix it to where the text does not get garbled? The example below shows in red circles the text that is messed up and in green what it should look like.

EDIT: here is my PROMPT

one@work ~/github/sp6-client
% echo $PROMPT
%K{blue}%n@%m%k %B%F{green}%(4~|...|)%3~%F{white}
%# %b

enter image description here

UPDATE: Options list

one@work ~/github/sp6-client
% setopt
alwaystoend
autocd
nobeep
correct
extendedglob
interactive
kshglob
login
monitor
printeightbit
shinstdin
zle
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
dman
  • 537
  • This will very likely turn out to be the same as https://unix.stackexchange.com/questions/197185/ . – JdeBP Jun 05 '18 at 16:23
  • I am not having any issues with auto completion and I am not using printf in my prompt. I updated the og post PROMPT. – dman Jun 05 '18 at 16:32
  • Some old versions of zsh had a bug looking like that when the HIST_REDUCE_BLANKS option was on. What version of zsh are you using. Do you have HIST_REDUCE_BLANKS enabled? https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1334858 – Stéphane Chazelas Jun 05 '18 at 16:51
  • https://www.zsh.org/mla/users/2013/msg00456.html, https://www.zsh.org/mla/workers/2014/msg00616.html fixed in https://www.zsh.org/mla/workers/2013/msg00807.html (in 5.0.3) – Stéphane Chazelas Jun 05 '18 at 17:00
  • No, HIST_REDUCE_BLANKS does not appear to be enabled. Also, this is a newer ver 5.1.1. I updated my post with the options enabled – dman Jun 05 '18 at 23:23
  • Anyway I had missed your Everything executes correctly regardless which was not the case with that issue. What's the OS? What's the output of infocmp -x in that urxvt? Is it possible that your prompt contains hidden character? print -r -- $PS1 | LC_ALL=C sed -n l – Stéphane Chazelas Jun 10 '18 at 07:35
  • Can you reproduce in env -u PS1 zsh -f? Or with export PS1; zsh -f? I can't reproduce here on Linux Mint 18 with that same version of zsh on the urxvt from the rxvt-unicode-256color package (with TERM=rxvt-unicode-256color) – Stéphane Chazelas Jun 10 '18 at 07:40
  • Is this is a problem anymore? – Marlon Richert Aug 14 '20 at 17:20
  • I stopped using Windows and use native Gentoo now – dman Aug 14 '20 at 18:53

0 Answers0