Tag Info

New answers tagged

2

The argument to a LS_COLORS directive is a string that is written to the terminal as part of an escape sequence. When displaying a file name, ls writes \e[, then the string associated with the file type, then m, then the file name, then \e[0m (where \e represents an escape character). This is the escape sequence that tells xterm and compatible terminals ...


4

The Theory The rules are : inside a ' delimited string, nothing gets interpreted and anything but a ' doesn't have special meaning. This means that only a ' need escaping but it also mean that, in order to escape it, you need the '\'' construct. (The first ' ends the string, the following \' adds a literal ' (the escape prevents the start of a new string) ...


7

Most programs that produce color will, by default, only produce it when the output is to a terminal, not a pipe or file. Generally, this is a good thing. Often, however, there is an override switch. For example, for ls, one can use --color=always and, as a result, color can be saved in shell variables. For example: grep also supports the ...


2

Try this way: :%s:\${ARRAY1\[@\]}:$1:g


3

:%s/\${ARRAY1\[@\]}/$1/ worked for me. Apparently, you must escape [ and ] but not { and }. I always use / instead of : as seperation, but %s:\${ARRAY1\[@\]}:$1:g works as well.


0

Those are ANSI escape codes. ^[ is the notation your shell uses to display an ESC byte (ASCII byte 27). So your example is an ESC byte followed by the text [A. As you can see in the Wikipedia article, ^[[ (ESC followed by [) is a Control Sequence Introducer or CSI. CSI A means move the cursor up by one column. If you want to see an escape code in the ...


0

It's not possible with the current version of xfce-terminal (4.12), since it uses an ancient, Gtk+2-based vte for terminal emulation. You should wait until they port their code to the new, Gtk+3-based vte, or switch to another terminal emulator (e.g. gnome-terminal).



Top 50 recent answers are included