Summary: | Colorful PS1 is somewhat broken | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | a.taha.baki |
Component: | history | Assignee: | Konsole Developer <konsole-devel> |
Status: | CLOSED NOT A BUG | ||
Severity: | critical | CC: | a.samirh78, nate |
Priority: | NOR | ||
Version: | 19.12.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
a.taha.baki
2020-01-31 11:04:56 UTC
What do you set PS1 to? (In reply to Ahmad Samir from comment #1) > What do you set PS1 to? It was: PS1='\e[1m[\e[35m\u\e[97m@\e[34m\h \W\e[97m]\$ \e[0m' I used tput instead of "\e[xxx" but it was not good either. Now, it is: PS1='[\u@\h \W]\$ ' Try: PS1='\[\e[1m[\e[35m\]\u\[\e[97m\]@\[\e[34m\]\h \W\[\e[97m]\]$ \[\e[0m\]' From `man bash`: \[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt \] end a sequence of non-printing characters Also remove the "\" before "$". (In reply to Ahmad Samir from comment #3) > Try: > PS1='\[\e[1m[\e[35m\]\u\[\e[97m\]@\[\e[34m\]\h \W\[\e[97m]\]$ \[\e[0m\]' > > From `man bash`: > \[ begin a sequence of non-printing characters, which could be used to > embed a terminal control sequence into the prompt > \] end a sequence of non-printing characters > > Also remove the "\" before "$". Thanks, it worked. |