Questions tagged [ansi]
Many computer terminals and terminal emulators support colour and cursor control through a system of escape sequences. One such standard is commonly referred to as ANSI Colour.
12 questions
0
votes
1
answer
958
views
Strip ANSI sequences from string through bash-python code
I try to use bash to strip ANSI color escape sequences from a string without success. I tried already some regex-based code.
#!/bin/bash
Blue='\033[0;34m' # Blue
Clear='\033[0m' # ...
0
votes
0
answers
902
views
How does one remove all ANSI exit codes/non-ascii characters from a text file (or: how does one make ANSIescape work in Sublime)
I've tried dang near every sed command I could concoct, a bunch I found on here while searching for hints, and a few other random ideas, and I just can't figure it out.
As some background, I've been ...
0
votes
0
answers
76
views
Display .TXT files in a different font in CLI
I am into BBSing in 2020. Bulletin Boards use ANSI graphics, which arent displayed correctly in current terminals... I use 'iconv' to change cp437 to utf8 and display .ANS files correctly.
However, I ...
1
vote
0
answers
27
views
How to fix HOME and END buttons in Bash with ANSI prompt?
In bash, whenever I have a prompt with ANSI color codes, it messes up the HOME and END functionality. Is there an obvious fix for this?
To re-create:
PS1="\e[0;33m\u@\e[m $ "
echo "This is a very ...
1
vote
0
answers
557
views
Why temp txt files are created in ANSI?
I have a big log file and i need to cut a part of it and paste it in the end of the same file...
so i created a script that looks for the chunks of code i need (sed) create a temp file ,paste it , ...
6
votes
1
answer
1k
views
Configure xfce4-terminal to recognize ANSI OSC 52 escape sequences to control the clipboard
tmux can put text into the system clipboard using ANSI OSC (Operating System Control) 52 escape sequences, but the terminal emulator needs to recognize them. xfce4-terminal, out-of-the-box doesn't ...
2
votes
1
answer
2k
views
Transparent palette in gnome-terminal
I use a transparent background in gnome-terminal.
For work, I often need to SSH into Windows machines. OpenSSH dutifully sends ANSI background colors, which results in a... less than ideal experience ...
9
votes
4
answers
20k
views
How to read ANSI encoded files in the right way?
I have some files that Ubuntu can't read it ( ANSI encoding ) but Windows can read it well.
When I open it in gedit or notepad++ it seems like this :
Êã ÇáÊÍæíá áÜÜ
How can I make Ubuntu read ...
18
votes
1
answer
10k
views
How to print the output of tree to pdf without losing the color?
I use the following command to print a directory structure to a file:
tree -h somepath/ > tree_of_somepath.txt
tree gives a nice colorized output on the terminal, but as expected this cannot be ...
39
votes
4
answers
27k
views
Saving output of a grep into a file with colors
I need to save the result of a grep command into a file, but I also want the output file to be formatted and keep the colors just like in the terminal.
Is there a way to do that? Maybe make grep save ...
2
votes
1
answer
3k
views
How to activate support for ANSI escape in terminal?
The ri tool of Ruby for the documentation offers the possibility to output ANSI escape sequences, but the terminal has to support it.
How is it possible to activate support for ANSI escape sequences ...
3
votes
1
answer
869
views
vim cursor color change only applied upon movement
In my .vimrc I have the following (based upon a tip on the vim Wikia):
if &term =~ "xterm\\|rxvt"
" use an red cursor in insert mode
let &t_SI = "\<Esc>]12;red\x7"
" use an ...