Linked Questions

71
votes
2answers
23k views

Why is my bash prompt getting bugged when I browse the history? [duplicate]

Often when I start looking at history of commands some of the characters from a command displayed aren't erased, for example: What's happening: prompt$ some_command prompt$ some_commanother_command ...
0
votes
1answer
1k views

Where to put the escape characters? [duplicate]

I've tried to change my prompt by editing .bashrc: export PS1="\e[0;32m[\u@\h \W]\$ \e[m" This seems to work, but ctrl-r to access reverse history ends up with my typing not appearing in the same ...
2
votes
1answer
649 views

colorize hostname in command line prompt [duplicate]

I wish to set a custom color for the hostname portion of my command line prompt (in bash). In my .bashrc file, the default command line prompt is: PS1='[\u@\h \W]\$ ' To colorize the hostname only, ...
2
votes
2answers
1k views

Terminal Line not properly wrapping [duplicate]

I am having a weird issue with my terminal wrapping, and after reading online I have found out it is likely because of my PS1 setup, however, I looked at it, and it seems to match what people are ...
2
votes
1answer
303 views

String artifacts from history on commandline [duplicate]

When I scroll through the bash history with the arrow keys and hit (for example) the following string: git clone hgit clone https://github.com/electron/electron-quick-start In the next line of ...
2
votes
1answer
69 views

What/when could possibly break if I don't include \[\] around the color code in bash script? [duplicate]

I was messing around with the color codes trying to understand how color code is used in bash script and I found that it works fine without including \[\] around it as in here: This.. red="\033[38;...
1
vote
1answer
90 views

Why is my previous history command in the terminal overwriting other text? [duplicate]

Here is my .bashrc config for ps1 i believe ive done it correctly but any time i press up for a previous command it gets all jumbled up. I can write long lines of commands without it wrapping only the ...
0
votes
0answers
23 views

PS1 possibly making Bash text wrap to same line [duplicate]

I just configured my .bashrc file (PS1) to get a fancier bash prompt and now I have an issue, all my text is wrapping to the same line in the terminal here is my PS1: PS1='${debian_chroot:+($...
88
votes
9answers
165k views

How to solve the issue that a Terminal screen is messed up? (usually after a resizing)

Sometimes, a terminal screen is messed up, and when we use man ls to read the manpages, or press the UP arrow to go to previous commands in history, the screen will show characters not as the right ...
59
votes
12answers
81k views

How to disable line wrap in a terminal?

I need to view large logs files using a bash shell. I was using less to open the files, but since the lines are too lengthy there is some kind of line/word wrapping going on. Since the files are ...
31
votes
5answers
72k views

How to make the terminal display user@machine in bold letters?

I have seen in some screen-shots (can't remember where on the web) that the terminal can display the [username@machine /]$ in bold letters. I'm looking forward to getting this too because I always ...
23
votes
2answers
3k views

Can the empty spaces/background in a terminal be replaced with a random(but pretty) pattern of ASCII characters?

Context and Question There are many ways to colorize the terminal and shell environment. The output of individual commands, such as ls and grep, can also be colorized. Not directly related but ...
6
votes
2answers
3k views

Terminal prompt overwrites current line

I have an issue with my terminal prompt line. When the line is too long it wraps on the same line and then Up arrow makes it look even worse. I have already checked Terminal prompt not wrapping ...
5
votes
2answers
3k views

Who does the linewrap and how to deactivate?

If I connect to a linux device via serial adapter (no matter if pyserial, screen or minicom), and no matter how I change settings like stty when I enter a long command it gets line wrapped (...
4
votes
4answers
2k views

bash: messed up display for long lines

I am using the GNU bash, version 4.4.0(1) on Ubuntu 16.04. When I enter long lines in my bash, its display is messed up. For example, assuming I am in ~/test/test/test/test/test/test/test and I ...

15 30 50 per page