Bug 81440 - zsh does not reset terminal attributes after tab completion
zsh does not reset terminal attributes after tab completion
Product: Red Hat Linux
Classification: Retired
Component: zsh (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jens Petersen
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-01-09 10:22 EST by Rene Uittenbogaard
Modified: 2007-04-18 12:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-10 09:40:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rene Uittenbogaard 2003-01-09 10:22:03 EST
Description of problem:
After using filename completion in zsh (for which zsh reports alternatives in 
bold), the terminal is left in its "bold printing" state, which causes further 
command output to be printed in bold too.

Version-Release number of selected component (if applicable): 4.0.4-8

How reproducible:

Steps to Reproduce:
$ PS1='$ '
$ unalias ls
$ ls -l a<press tab here>
acs/             awk-guide.html   awk.html 
(now complete the filename and press ENTER)
$ ls -l awk.html
-rw-r--r-- 1 rene  knowldge  22689 Jan 29  2001 awk.html
(now, not only the completed part of the filename is in bold, but also the 
output of ls(1). Note that ls needs to be unaliased, otherwise this would not 
have been detected; however, other commands, like cat(1), show the same 
problem, too).

Actual results:
Command output is printed bold

Expected results:
Completed filename should be bold, but not the command output.

Additional info:
Comment 1 Jens Petersen 2003-02-10 09:05:13 EST
I'm not sure I'm able to reproduce this yet.
Are you using some completion extensions.
Could please include your zsh config files?
Comment 2 Rene Uittenbogaard 2003-02-10 09:40:36 EST
Thanks for the tip. I only use zsh for one user, therefore I didn't see that 
the problem does not occur for other users. The problem lies in my prompt, 
which consisted of the following string:

PS1="[${cyan}%/${reset}] %500(g//(`id -gn`%) )%B%0(?/${greenbold}yes${reset}/
${redbold}no${reset})%0(#/#/:) "

in which:


Note the fact that bold printing is turned on with %B and turned off with an 
ANSI escape sequence. Pairing the %B with %b solves the problem, as does 
removing the %B and turning on/off bold mode by ANSI codes only.

Note You need to log in before you can comment on or make changes to this bug.