Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 81440 - zsh does not reset terminal attributes after tab completion
Summary: zsh does not reset terminal attributes after tab completion
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: zsh
Version: 8.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-09 15:22 UTC by Rene Uittenbogaard
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-10 14:40:36 UTC


Attachments (Terms of Use)

Description Rene Uittenbogaard 2003-01-09 15:22:03 UTC
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:
always

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 14:05:13 UTC
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 14:40:36 UTC
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:
greenbold="%{^[[1;32m%}"
reset="%{^[[0m%}"

etc.

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.