bash prompt messed up
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Today I had to install a couple of applications (a Postgres client and other stuff) and I had to setup a few things like environment paths.
I had a couple of aliases working and they stopped working after that. They are set on ~/.bash_profile
so I've run source ~/.bash_profile
, but then I got my bash prompt messed up, like this:
This is the command within my bash_profile
that generates it:
export PS1="[$BOLD$MAGENTA]u [$WHITE]in [$GREEN]w[$WHITE]$([[ -n $(git branch 2> /dev/null) ]] && echo " on ")[$PURPLE]$(parse_git_branch)[$WHITE]n$symbol[$RESET]"
As you can see, the [
s and ]
s are appearing, when they should not be displayed at all, and the u
, n
, and w
are not being replaced with the appropriate strings. But the colour changes are still working.
I'm a bit confused about what's going on here, any ideas?
bash prompt
add a comment |Â
up vote
2
down vote
favorite
Today I had to install a couple of applications (a Postgres client and other stuff) and I had to setup a few things like environment paths.
I had a couple of aliases working and they stopped working after that. They are set on ~/.bash_profile
so I've run source ~/.bash_profile
, but then I got my bash prompt messed up, like this:
This is the command within my bash_profile
that generates it:
export PS1="[$BOLD$MAGENTA]u [$WHITE]in [$GREEN]w[$WHITE]$([[ -n $(git branch 2> /dev/null) ]] && echo " on ")[$PURPLE]$(parse_git_branch)[$WHITE]n$symbol[$RESET]"
As you can see, the [
s and ]
s are appearing, when they should not be displayed at all, and the u
, n
, and w
are not being replaced with the appropriate strings. But the colour changes are still working.
I'm a bit confused about what's going on here, any ideas?
bash prompt
1
What exactly is the problem, and what did you try to do ?
â Thomas Gros
Dec 13 '17 at 16:38
Yeah you changed your PS1 variable and now the prompt look's different - change it back, or just typeexport PS1="> "
to have a cleaner prompt.
â chevallier
Dec 13 '17 at 19:16
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Today I had to install a couple of applications (a Postgres client and other stuff) and I had to setup a few things like environment paths.
I had a couple of aliases working and they stopped working after that. They are set on ~/.bash_profile
so I've run source ~/.bash_profile
, but then I got my bash prompt messed up, like this:
This is the command within my bash_profile
that generates it:
export PS1="[$BOLD$MAGENTA]u [$WHITE]in [$GREEN]w[$WHITE]$([[ -n $(git branch 2> /dev/null) ]] && echo " on ")[$PURPLE]$(parse_git_branch)[$WHITE]n$symbol[$RESET]"
As you can see, the [
s and ]
s are appearing, when they should not be displayed at all, and the u
, n
, and w
are not being replaced with the appropriate strings. But the colour changes are still working.
I'm a bit confused about what's going on here, any ideas?
bash prompt
Today I had to install a couple of applications (a Postgres client and other stuff) and I had to setup a few things like environment paths.
I had a couple of aliases working and they stopped working after that. They are set on ~/.bash_profile
so I've run source ~/.bash_profile
, but then I got my bash prompt messed up, like this:
This is the command within my bash_profile
that generates it:
export PS1="[$BOLD$MAGENTA]u [$WHITE]in [$GREEN]w[$WHITE]$([[ -n $(git branch 2> /dev/null) ]] && echo " on ")[$PURPLE]$(parse_git_branch)[$WHITE]n$symbol[$RESET]"
As you can see, the [
s and ]
s are appearing, when they should not be displayed at all, and the u
, n
, and w
are not being replaced with the appropriate strings. But the colour changes are still working.
I'm a bit confused about what's going on here, any ideas?
bash prompt
edited Dec 13 '17 at 21:46
JdeBP
28.6k459134
28.6k459134
asked Dec 13 '17 at 16:18
zok
1112
1112
1
What exactly is the problem, and what did you try to do ?
â Thomas Gros
Dec 13 '17 at 16:38
Yeah you changed your PS1 variable and now the prompt look's different - change it back, or just typeexport PS1="> "
to have a cleaner prompt.
â chevallier
Dec 13 '17 at 19:16
add a comment |Â
1
What exactly is the problem, and what did you try to do ?
â Thomas Gros
Dec 13 '17 at 16:38
Yeah you changed your PS1 variable and now the prompt look's different - change it back, or just typeexport PS1="> "
to have a cleaner prompt.
â chevallier
Dec 13 '17 at 19:16
1
1
What exactly is the problem, and what did you try to do ?
â Thomas Gros
Dec 13 '17 at 16:38
What exactly is the problem, and what did you try to do ?
â Thomas Gros
Dec 13 '17 at 16:38
Yeah you changed your PS1 variable and now the prompt look's different - change it back, or just type
export PS1="> "
to have a cleaner prompt.â chevallier
Dec 13 '17 at 19:16
Yeah you changed your PS1 variable and now the prompt look's different - change it back, or just type
export PS1="> "
to have a cleaner prompt.â chevallier
Dec 13 '17 at 19:16
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Seems like some expert thought it a good idea to obfuscate ANSI color codes in environment variables and use them in a custom prompt, meanwhile messing up the escape syntax, then setting the prompt "for you" without asking.
Comment out the PS1 line and you should get a default prompt. Or change it to something you prefer, but better don't rely on custom environment variables.
Related:
- How to change the format of the bash prompt?
- What color codes can I use in my PS1 prompt?
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Seems like some expert thought it a good idea to obfuscate ANSI color codes in environment variables and use them in a custom prompt, meanwhile messing up the escape syntax, then setting the prompt "for you" without asking.
Comment out the PS1 line and you should get a default prompt. Or change it to something you prefer, but better don't rely on custom environment variables.
Related:
- How to change the format of the bash prompt?
- What color codes can I use in my PS1 prompt?
add a comment |Â
up vote
0
down vote
Seems like some expert thought it a good idea to obfuscate ANSI color codes in environment variables and use them in a custom prompt, meanwhile messing up the escape syntax, then setting the prompt "for you" without asking.
Comment out the PS1 line and you should get a default prompt. Or change it to something you prefer, but better don't rely on custom environment variables.
Related:
- How to change the format of the bash prompt?
- What color codes can I use in my PS1 prompt?
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Seems like some expert thought it a good idea to obfuscate ANSI color codes in environment variables and use them in a custom prompt, meanwhile messing up the escape syntax, then setting the prompt "for you" without asking.
Comment out the PS1 line and you should get a default prompt. Or change it to something you prefer, but better don't rely on custom environment variables.
Related:
- How to change the format of the bash prompt?
- What color codes can I use in my PS1 prompt?
Seems like some expert thought it a good idea to obfuscate ANSI color codes in environment variables and use them in a custom prompt, meanwhile messing up the escape syntax, then setting the prompt "for you" without asking.
Comment out the PS1 line and you should get a default prompt. Or change it to something you prefer, but better don't rely on custom environment variables.
Related:
- How to change the format of the bash prompt?
- What color codes can I use in my PS1 prompt?
answered Dec 14 '17 at 10:07
Murphy
1,7471517
1,7471517
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410686%2fbash-prompt-messed-up%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
What exactly is the problem, and what did you try to do ?
â Thomas Gros
Dec 13 '17 at 16:38
Yeah you changed your PS1 variable and now the prompt look's different - change it back, or just type
export PS1="> "
to have a cleaner prompt.â chevallier
Dec 13 '17 at 19:16