|
Bugzilla – Full Text Bug Listing |
| Summary: | mc on root konsole show me a "B" on the command line | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.3 | Reporter: | Chema Ollés <jmolles> |
| Component: | Other | Assignee: | Vladimir Nadvornik <nadvornik> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | werner |
| Version: | Alpha 1plus | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | photo with my mc | ||
|
Description
Chema Ollés
2007-03-10 19:38:49 UTC
What version of mc are you running? Could you please attach a screenshot? Created attachment 123938 [details]
photo with my mc
Hi,this is the version I have
mc-4.6.1-73
What is the output of 'locale' command in the same xterm? Does it happen with 'export LANG=C' too? Hi locale on konsole: linux:~ # locale LANG=es_ES.UTF-8 LC_CTYPE="es_ES.UTF-8" LC_NUMERIC="es_ES.UTF-8" LC_TIME="es_ES.UTF-8" LC_COLLATE="es_ES.UTF-8" LC_MONETARY="es_ES.UTF-8" LC_MESSAGES="es_ES.UTF-8" LC_PAPER="es_ES.UTF-8" LC_NAME="es_ES.UTF-8" LC_ADDRESS="es_ES.UTF-8" LC_TELEPHONE="es_ES.UTF-8" LC_MEASUREMENT="es_ES.UTF-8" LC_IDENTIFICATION="es_ES.UTF-8" LC_ALL= after export LANG="C";mc The same effect Regards *** Bug 260714 has been marked as a duplicate of this bug. *** It seems that mc can not handle escape secquences within the PS1 prompt. Please note that I'll not change this prompt (see bug #144620) because on a standard prompt it works flawless. I have following line in my /root/.bashrc : export PS1='\[\033[1;37m\][\[\033[1;31m\]\u\[\033[0m\]@\h\[\033[0m\] \[\033[1;34m\]\w\[\033[1;37m\]]\[\033[0m\] ' and this prompt works both in shell and in mc. Not acceptable because you never know if the escape sequences will
cause trouble without using tput, therefore I prefere
if test "$UID" -eq 0 -a -t && type -p tput > /dev/null 2>&1 ; then
_bred="$(tput bold 2> /dev/null; tput setaf 1 2> /dev/null)"
_sgr0="$(tput sgr0 2> /dev/null)"
PS1="\[$_bred\]$PS1\[$_sgr0\]"
unset _bred _sgr0
fi
resulting e.g. for a real xterm to
\[\033[1m\033[31m\]\h:\W \$ \[\033(B\033[m\]
the question rises why this results in `B' for your mc. Which
terminal type is used by mc? Beside this I've started mc as
root on magellan and it works flawless, e.g. no colored prompt
and no `B'. IMHO this `B' is related to the sgr0 sequences
of TERM=xterm, nevertheless this is send to the terminal and
not to the prompt. And as long the terminal can handle its
sequences you never will see this.
mc filters the prompt with this function: ========== /* Remove all control sequences from the argument string. We define * "control sequence", in a sort of pidgin BNF, as follows: * * control-seq = Esc non-'[' * | Esc '[' (0 or more digits or ';' or '?') (any other char) * * This scheme works for all the terminals described in my termcap / * terminfo databases, except the Hewlett-Packard 70092 and some Wyse * terminals. If I hear from a single person who uses such a terminal * with MC, I'll be glad to add support for it. (Dugan) * Non-printable characters are also removed. */ char *strip_ctrl_codes (char *s) =========== It apparently needs to be extended. Werner, can please suggest, what needs to be added? Is there any documentation available? Simply use infocmp -T xterm -1 | less to see the sgr0 terminfo item. IMHO the character ( hast to accepted beside ESC ; ? [ 0-9 and a-zA-Z. Sometimes also the characters ! and > are also used. *** Bug 291051 has been marked as a duplicate of this bug. *** fixed: mc can now detect the \033(B sequence |