You are not logged in.

#1 2006-11-06 16:43:15

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

A good site about x1b shell escapes?

I am curious to know what I can actually do with the x1b shell escapes. I tried seeking with google but I did not found an exaustive site,
Only pieces of info about colors, clearing screen ect.

Do you know a good informative place?

Offline

#2 2006-11-06 16:56:22

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: A good site about x1b shell escapes?

Please explain what these x1b escapes do.  Searching by some arbitrary code never works... as such, I have no idea what you're talking about, so cannot comment until I have further info.

Offline

#3 2006-11-06 19:28:15

Leffe
Member
Registered: 2006-05-30
Posts: 47

Re: A good site about x1b shell escapes?

x1b appears to be the the escape character, which is more commonly referred to as e or E.

I recommend infocmp -1L for the instructions your current terminal is likely to understand.  Use curses for anything serious.

Offline

#4 2006-11-07 10:45:23

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: A good site about x1b shell escapes?

Thanks Leffe, infocmp is nice. But actually not much human readable.
The line
set_foreground=E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
lemme guess I can set the foreground of shell lines. But it does not say much...

Offline

#5 2006-11-07 12:12:37

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: A good site about x1b shell escapes?


to live is to die

Offline

#6 2006-11-07 15:25:12

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: A good site about x1b shell escapes?

better:

man console_codes
man 7 urxvt

There's probably alot more - mostly escape codes beyond colors and simple things are terminal specific.

Offline

#7 2006-11-07 16:46:48

Leffe
Member
Registered: 2006-05-30
Posts: 47

Re: A good site about x1b shell escapes?

ezzetabi wrote:

Thanks Leffe, infocmp is nice. But actually not much human readable.
The line
set_foreground=E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
lemme guess I can set the foreground of shell lines. But it does not say much...

The setf command (listed above) translates to the setaf command, which is defined as thus: setaf=E[3%p1%dm Consider the %p1%d the color number and the rest is to be copied verbatim.

The long setf command switches two colors, and the terminfo manpage has the reason.

I wonder why it is possible to do something like E[33;44m, which switches both foreground and background.  Perhaps it's like that for all commands...?

Offline

#8 2006-11-09 15:47:15

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: A good site about x1b shell escapes?

Those are the kind of answers I love.
Thanks a lot guys!

Offline

Board footer

Powered by FluxBB