question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Emulation: bold off broken and dim not implemented?

See original GitHub issue

Shutting off (20 + attribute) bold is not working, although others implemented (uline and reverse) do, i.e.,

echo -e '\x1B[33m yellow \x1B[1m bold \x1B[21m normal \x1B[m off'
echo -e '\x1B[33m yellow \x1B[4m uline \x1B[24m normal \x1B[m off'
echo -e '\x1B[33m yellow \x1B[7m reverse \x1B[27m normal \x1B[m off'

Oddly enough, changing 21 (bold off) to 22 (dim off) works: echo -e '\x1B[33m yellow \x1B[1m bold \x1B[22m normal \x1B[m off'

… but bold -> dim enable keeps bold on – I thought bold/dim are implemented as mutually exclusive, unlike underline, blink, and reverse that can be added or taken away with either bold or dim? At the very least if dim is not implemented, it should shutoff bold, but it does not: echo -e '\x1B[33m yellow \x1B[1m bold \x1B[2m dim \x1B[m off'

Two related questions:

  1. I get blink (at least for now 😉 not implemented, but how about dim and italic?
  2. Can a custom color palette be constructed? The one in v3 branch (below) is more palatable to me.

Details

  • Browser and browser version: Firefox 56 (64-bit)
  • OS version: Fedora 26 (linux)
  • xterm.js version: 2.9.2 and latest v3 branch

Steps to reproduce

$ cat bin/ansi-test.sh
#!/bin/sh

alias print='echo -en'
alias println='echo -e'
csi="\\x1B["
color=( black red green yellow blue magenta cyan white )
attr=( reset bright dim italic uline blink 6 reverse )

for bg in `seq 0 7`; do
        print "(${csi}m${bg}) BG ${csi}0;1;$((30+${bg}))m ${color[${bg}]}${csi}m"
        for fg in `seq 0 7`; do
                print "\n    FG ${csi}0;1;$((30+${fg}))m ${color[${fg}]}${csi}m\t"
                print "${csi}$((40+${bg}))m"
                print "${csi}$((30+${fg}))m"
                for ca in `seq 1 7`; do
                        print "${csi}${ca}m  ${attr[${ca}]}  ${csi}$((20+${ca}))m"
                done
                print "${csi}m"
        done
        println "${csi}m"
done

Showing Terminology - xterm.js - v3 branch: terminology xterm v3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
mofuxcommented, Oct 9, 2017

I’ll try to create a PR to enable dim support.

0reactions
Tyriarcommented, Oct 9, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

XTerm – Frequently Asked Questions (FAQ) - Thomas E. Dickey
xterm is the standard terminal emulator for the X Window System. This page gives some background and ... "no" — the terminal does...
Read more >
RealView Emulation Baseboard Real-Time System Model ... - Arm
Non -Confidential. List of Figures. RealView Emulation Baseboard Real-Time. System Model User Guide. Figure 1-1. Top-level model as implemented by System ...
Read more >
Re: vim quits and cygwin window contents not restored
Charles Wilson wrote: Sorry, I haven't been following this thread. See below. I'll try to figure out which parts are missing, and reinstate...
Read more >
Kermit 95 Fixed Bugs List - The Kermit Project
Kermit 95's terminal emulator supports color and highlighting (bold) character attributes in the Terminal window, which are set by escape sequences from the ......
Read more >
PySimpleGUI
Up until this week, I never had luck with any UI libraries like Tkinter, Qt and Kivy. I went from not even being...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found