Change PS1 in .bashrc so that the following directory path is shown:

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
A little background:
I am running Windows 10, have installed git bash, and created the .bashrc file.
Right now in my .bashrc, I have the following line:
PS1='w> '
So suppose I am on my desktop, and there is a folder called test. In git bash, it would show this:
~/Desktop/Test> (enter command here)
In my cmd, it would show:
C:UsersJohnDesktopTest> (enter command here)
I like the cmd path that it shows, and was wondering if it is possible to show this path instead of the one git bash shows, by modifying the PS1.
bash command-line directory prompt windows-subsystem-for-linux
add a comment |Â
up vote
0
down vote
favorite
A little background:
I am running Windows 10, have installed git bash, and created the .bashrc file.
Right now in my .bashrc, I have the following line:
PS1='w> '
So suppose I am on my desktop, and there is a folder called test. In git bash, it would show this:
~/Desktop/Test> (enter command here)
In my cmd, it would show:
C:UsersJohnDesktopTest> (enter command here)
I like the cmd path that it shows, and was wondering if it is possible to show this path instead of the one git bash shows, by modifying the PS1.
bash command-line directory prompt windows-subsystem-for-linux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
A little background:
I am running Windows 10, have installed git bash, and created the .bashrc file.
Right now in my .bashrc, I have the following line:
PS1='w> '
So suppose I am on my desktop, and there is a folder called test. In git bash, it would show this:
~/Desktop/Test> (enter command here)
In my cmd, it would show:
C:UsersJohnDesktopTest> (enter command here)
I like the cmd path that it shows, and was wondering if it is possible to show this path instead of the one git bash shows, by modifying the PS1.
bash command-line directory prompt windows-subsystem-for-linux
A little background:
I am running Windows 10, have installed git bash, and created the .bashrc file.
Right now in my .bashrc, I have the following line:
PS1='w> '
So suppose I am on my desktop, and there is a folder called test. In git bash, it would show this:
~/Desktop/Test> (enter command here)
In my cmd, it would show:
C:UsersJohnDesktopTest> (enter command here)
I like the cmd path that it shows, and was wondering if it is possible to show this path instead of the one git bash shows, by modifying the PS1.
bash command-line directory prompt windows-subsystem-for-linux
edited Jan 15 at 0:06
Jeff Schaller
31.8k848109
31.8k848109
asked Jan 14 at 23:17
K Split X
288312
288312
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
That seems not possible with w or W but you can do this:
PS1='$PWD> '
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
accepted
That seems not possible with w or W but you can do this:
PS1='$PWD> '
add a comment |Â
up vote
0
down vote
accepted
That seems not possible with w or W but you can do this:
PS1='$PWD> '
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
That seems not possible with w or W but you can do this:
PS1='$PWD> '
That seems not possible with w or W but you can do this:
PS1='$PWD> '
answered Jan 14 at 23:39
Hauke Laging
53.4k1282130
53.4k1282130
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%2f417133%2fchange-ps1-in-bashrc-so-that-the-following-directory-path-is-shown%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