Questions tagged [ansi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

How to know the end of an ANSI control code?

I'm working on code for a serial terminal and I'm implementing the ANSI escape codes for moving around the cursor, clearing the screen, etc, and I am curious how to know which to use since there doesn'...
0
votes
1answer
27 views

Problematic [0;5;30m ANSI Code in ANSI Art

I have another question about ANSI Art. The problem is this file https://16colo.rs/pack/lgcy-003/hayn9-smaller.ans It have "à" character (the women in ANSI Art have it inside medalion on her ...
3
votes
3answers
86 views

How to convert escape sequences to text while preserving display format?

I have a text file that contains (ANSI ?) escape sequences: When I cat the file I get formatted output: How do I save / pipe the output of the text file to a new file so that the control codes are ...
0
votes
0answers
35 views

Behavior of ANSI escape codes when mixing background and foreground [duplicate]

I'm investigating once more my ANSI escape rendering scripts and I've found weird behavior. The output color is defined by background or foreground by both mixed together. Example: echo -e "\x1b[...
0
votes
1answer
53 views

Difference between ANSI art and Linux Terminal ANSI escapes codes

I just found one ANSI escape that is different in ANSI art and in Linux Terminal. [0;5;47;30m The problem is this ANSI Art https://16colo.rs/pack/blocktronics-b-sides/om%20-%20bjork%20-%20debut.ans ...
1
vote
1answer
41 views

Missing one character in ANSI art on Linux

This continuation of Why this ANSI Art doesn't render properly on Linux terminal I have one more issue with ANSI art on Linux terminal that renders properly in ANSI art editor (like PabloDraw). The ...
1
vote
1answer
65 views

Why this ANSI Art doesn't render properly on Linux terminal

I'm trying to investigate why my library don't render this ANSI art properly: I though that the problem is in my ANSI escape processing but it seems that it's the same in real terminal (tested in ...
9
votes
3answers
2k views

how to use 256 colors for background color in terminal

I know how to use 256 colors for text in terminal: printf "\033[38;5;196mhello\n" But for background color, I seem to be limited to the basic 8 colors only, ie: printf "\033[41mhello\n&...
0
votes
1answer
232 views

Scrolling terminal up using ANSI escape codes

I'm trying to create a simple terminal program that can "scroll up" to see text that has been written to the terminal (but has since moved off the screen). I can use the ANSI escape code \...
1
vote
2answers
127 views

In this \033[01;32m VT100 style ANSI Escape Sequences what is the 01; and the m?

This came from ~/.bashrc PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' Notice the \033[01;32m I know \033[ is a Control Sequence ...
1
vote
0answers
32 views

Avoid ANSI codes in bash prompt when using arrow keys

First of all, aw two things to make clear: Yes I've seen there are already several questions with a similar sounding headline, but they are neither talking about the same situation nor do they have a ...
2
votes
2answers
358 views

What ANSI escape 0x1b[0A and other 0 value codes should do?

I working on my ANSI formatting code for jQuery Terminal. It almost working but I have one issue it's related to 0A ansi code that should move cursor (also other 0 cursor codes: B C D E F) I've ...
0
votes
0answers
40 views

Bashrc not loading when running manpager

I have found issues with using the MANPAGER variable in bash in order to set vim to be my manpager. Initially I set my manpager using the method shown in :help manpager by doing: export MANPAGER="...
0
votes
1answer
114 views

What should ASCII character 26 do?

I have code where I display ANSI art, I've found that last 128 bytes hold SAUCE meta data. The problem I have is just before the SAUCE data there is one character that looks out of place, that is ...
-3
votes
1answer
96 views

What is the 38;5 sequence in $PS1?

I tried to find info online, but I could not find any. It seems that many people use a specific sequence of numbers, without actually providing any explanation why. More specifically, my $PS1 in ...
0
votes
1answer
362 views

What's the correct way to use ANSI escape sequences to edit terminal content “in place”?

So I'm trying to have a simple terminal application with the following behavior: On launch, the screen is cleared, and some content is written at the top of the empty screen Every time "enter" is ...
0
votes
0answers
25 views

How do I add characters to the ANSI terminal so that the user can move their cursor through them?

Specifically, I want to do something like this: aaaaaaaa_ Where the cursor can move through the as.
0
votes
0answers
25 views

How to fix HOME and END buttons in Bash with ANSI prompt? [duplicate]

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 ...
0
votes
1answer
744 views

Bash - ANSI color code for purple background with bold black text

What is the ANSI color code for a purple (or dark purple) background with black bold text (foreground). As an example, here is cyan with black bold text: echo -e "\e[30;1;46mExample\e[0m" After ...
0
votes
1answer
105 views

How to “echo” colored messages without “-e” option nor intermediate variable?

I really struggle understanding the behavior of echo (and others such commands) while processing ANSI escape codes to print colored messages. I know I can use the -e option like this: echo -e "\e[...
0
votes
1answer
265 views

Clearing a line when terminal window is narrowed

Consider the following code (written in PHP, but that's not important. Answers may use pure Bash). The goal is to fill a terminal line with characters for the entire width of the line. Now, if you ...
1
vote
2answers
848 views

Display ANSI colours with curl?

I'm currently trying to curl some raw text and have it displayed with interpreted ANSI colours in the Terminal. Currently, when I run curl http://example.com/test.txt (not the actual URL), it simply ...
1
vote
2answers
1k views

How can I make ANSI RGB color codes bold?

I've been learning how to customize my prompt with colors. I understand that you can define red text with \e[0;31m and define an RGB color (in the following example, R=255, G=95, B=255) as \e[38;2;...
0
votes
1answer
541 views

Changing the color of colored outputs

My terminal has a white background. When commands print yellow text to the terminal, I can't see the text clearly (due to low contrast). I thought: wouldn't it be great if all the yellow text that ...
13
votes
1answer
2k views

What type of encoding do these ANSI artworks use?

I've found this website; it has zip files (links on the main page) with all the artworks. Some of them have an .ans extension and they look like ANSI escape codes used on Linux/Unix, but when I open ...
1
vote
1answer
2k views

What is the ANSI escape equivalent of `tput sgr0`?

To avoid a subshell, what are the ANSI escape equivalents of tput sgr0 for an ANSI-compatible terminal?
-1
votes
1answer
61 views

How to change colors as user in Redhat linux server (iterm2, ssh)

My school server is Redhat 7.4 and I really hate the default colors which are printed in ls. bold and dark colors with a black backround is really hard for me to see any file names. I am currently ...
0
votes
0answers
154 views

Bash: print invisible timestamp in PS1

My current PS1 looks like this: ╭dotfiles ╰(ivan)• I'd like to add an invisible timestamp to it, so I can select/highlight it with the cursor when I want to see what time a command ran, but not ...
0
votes
2answers
406 views

ANSI in BitchX not displaying properly

I am attempting to get ANSI to display properly in a screen session using Iterm2 on OS X, the default TERM is set to screen.xterm-256color I tried export TERM=vt100 and export TERM=ansi and ...
1
vote
1answer
32 views

ansi: two fast questions about this term

I'm a little confused about ANSI and sql. Is the ansi/sql relationship the same as posix/unix? Is sql language an ansi standard?