long commands makes terminal lag after modifying PS1
C
The string property is not properly closed by default
You have to add a layer of closure by adding unprintable brackeys
Example 1 : We want Hello World in green as our prompt
Without brackeys:
PS1="\033[1;32m Hello World \033[00m"
With brackeys (no text-wrapping):
PS1="\[ \033[1;32m \] Hello World \[ \033[00m \]"
//note : I added spaces for more clarity but they are printed if you add them
Example 2 : My prompt
PS1="\[\033[1;32m\]\u@\h\[\033[00m\] [ \[\033[38;5;215m\]\[\e[5m\]\w\[\e[25m\]\[\033[00m\] ] "
//note : I have my username and machine in green and the folder i'm in coloured in blinking orange
Ressource for colours and effects :
"https://misc.flogisoft.com/bash/tip_colors_and_formatting"
Also in C:
- Title
- disable gnu++11 option
- Category
- C
- Title
- 'int' is not a subtype of type 'double' dart
- Category
- C
- Title
- california
- Category
- C
- Title
- passing 2d array as parameter to function in c
- Category
- C
- Title
- xamarin command listview button
- Category
- C
- Title
- c check if char is an operator
- Category
- C
- Title
- java.lang.SecurityException: Permission denied (missing INTERNET permission?)
- Category
- C
- Title
- triangulo
- Category
- C
- Title
- tar cmd
- Category
- C
- Title
- what is x:Name Xamarin forms
- Category
- C
- Title
- c vs python
- Category
- C
- Title
- reverse function in c
- Category
- C
- Title
- write a program to ask the user 8 integer numbers. your program will then move all negative elements of your array to the end of the array without changing the order of positive elements and negative elements
- Category
- C
- Title
- write a binary file c
- Category
- C
- Title
- version of libgcc
- Category
- C
- Title
- how to remove \n from a string c
- Category
- C
- Title
- append to list in c
- Category
- C
- Title
- buscar caracter
- Category
- C
- Title
- c program to find the sum of given number
- Category
- C
- Title
- '&&' within '||'
- Category
- C
- Title
- diferencia entre * y & en c
- Category
- C
- Title
- how to login to another user in powershell
- Category
- C
- Title
- fa fa-facebook
- Category
- C
- Title
- what is conio.h
- Category
- C
- Title
- python web crawler
- Category
- C
- Title
- c printf uint32_t
- Category
- C
- Title
- 233 pounds to inr
- Category
- C
- Title
- mostrar lista recursiva
- Category
- C
- Title
- c isdigit function
- Category
- C
- Title
- read a binary file c
- Category
- C
- Title
- add border to image android
- Category
- C
- Title
- jock cranley
- Category
- C
- Title
- how to call the tkinter insert command from another class
- Category
- C
- Title
- accessing elements 2D array using pointers
- Category
- C
- Title
- C largest unsigned int
- Category
- C
- Title
- xmlns='' was not expected
- Category
- C
- Title
- tkinter create_line
- Category
- C
- Title
- division recursiva
- Category
- C
- Title
- command line arguments c
- Category
- C
- Title
- c pause for 1 second
- Category
- C
- Title
- slug urls django
- Category
- C
- Title
- potencia recursiva
- Category
- C
- Title
- how to free memory in c
- Category
- C
- Title
- code wars responsable drinker
- Category
- C
- Title
- c zero out array
- Category
- C
- Title
- duplicar cadena
- Category
- C
- Title
- change a attribute in dataframe
- Category
- C
- Title
- piramide
- Category
- C
- Title
- how to open chrome using cmd
- Category
- C
- Title
- c bitwise operators
- Category
- C
- Title
- write in a file using c
- Category
- C
- Title
- bella ciao lyrics
- Category
- C
- Title
- how to put quotes inside string c
- Category
- C
- Title
- select all file from date powershell
- Category
- C
- Title
- matrix c declaration
- Category
- C
- Title
- printf("%3d ",XX);
- Category
- C
- Title
- es vocal
- Category
- C
- Title
- error: ‘istringstream’ is not a member of ‘std’
- Category
- C
- Title
- pass the pointer in C
- Category
- C
- Title
- how to rebasde
- Category
- C
- Title
- c print array
- Category
- C
- Title
- pangram program in c
- Category
- C
- Title
- CL/cl.h: No such file or directory
- Category
- C
- Title
- update ubuntu in terminal
- Category
- C
- Title
- powershell list big files
- Category
- C
- Title
- code in c skipping over scanf
- Category
- C
- Title
- resto de division recursiva
- Category
- C
- Title
- Declare macro
- Category
- C
- Title
- how to globally initlailize a struct
- Category
- C
- Title
- scanf read line
- Category
- C
- Title
- what is the meaningof noremap
- Category
- C
- Title
- root in C
- Category
- C
- Title
- lelcetric fied
- Category
- C
- Title
- c allocate array
- Category
- C
- Title
- v
- Category
- C
- Title
- infinite loop using while
- Category
- C
- Title
- C why is is & nit used in scan f fr string
- Category
- C
- Title
- vbl share price
- Category
- C
- Title
- hentai clochette
- Category
- C
- Title
- how to ascii art in c
- Category
- C
- Title
- how to open a website in c
- Category
- C
- Title
- doubly linked list c
- Category
- C
- Title
- battlefield4u.com
- Category
- C
- Title
- multiplication operator in c
- Category
- C
- Title
- remove element queue
- Category
- C
- Title
- last element from list javascript
- Category
- C
- Title
- c string concatenation with int
- Category
- C
- Title
- get configuration script window 7
- Category
- C
- Title
- vector aleatorio sin repetir
- Category
- C
- Title
- print integer to stdout using write or putchar?
- Category
- C
- Title
- kadane's algorithm
- Category
- C
- Title
- how to pass an array value to a pthread in c
- Category
- C
- Title
- first person view unity
- Category
- C
- Title
- XAudio2 C
- Category
- C
- Title
- passing 'const char *' to parameter of type 'char *' discards qualifiers
- Category
- C
- Title
- isalpha c
- Category
- C
- Title
- docker pull command
- Category
- C
- Title
- dani
- Category
- C
- Title
- C/c drop mime
- Category
- C
- Title
- es par
- Category
- C