Why would the PS1 export won't carry on to a sub process?
I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?
I ask since this sequence did work for me:
MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE
bash
add a comment |
I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?
I ask since this sequence did work for me:
MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE
bash
1
IsPS1
changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
– SiKing
Sep 13 '16 at 16:36
Shell internal variables such asPS1
should not be exported, as something set forbash
is incompatible withzsh
. In the interactive configuration, set the appropriatePS1
.
– thrig
Sep 13 '16 at 16:58
Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.
– JohnDoea
Sep 13 '16 at 18:00
add a comment |
I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?
I ask since this sequence did work for me:
MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE
bash
I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?
I ask since this sequence did work for me:
MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE
bash
bash
edited Jan 6 at 21:44
Rui F Ribeiro
39.5k1479132
39.5k1479132
asked Sep 13 '16 at 16:32
JohnDoeaJohnDoea
601132
601132
1
IsPS1
changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
– SiKing
Sep 13 '16 at 16:36
Shell internal variables such asPS1
should not be exported, as something set forbash
is incompatible withzsh
. In the interactive configuration, set the appropriatePS1
.
– thrig
Sep 13 '16 at 16:58
Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.
– JohnDoea
Sep 13 '16 at 18:00
add a comment |
1
IsPS1
changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
– SiKing
Sep 13 '16 at 16:36
Shell internal variables such asPS1
should not be exported, as something set forbash
is incompatible withzsh
. In the interactive configuration, set the appropriatePS1
.
– thrig
Sep 13 '16 at 16:58
Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.
– JohnDoea
Sep 13 '16 at 18:00
1
1
Is
PS1
changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html– SiKing
Sep 13 '16 at 16:36
Is
PS1
changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html– SiKing
Sep 13 '16 at 16:36
Shell internal variables such as
PS1
should not be exported, as something set for bash
is incompatible with zsh
. In the interactive configuration, set the appropriate PS1
.– thrig
Sep 13 '16 at 16:58
Shell internal variables such as
PS1
should not be exported, as something set for bash
is incompatible with zsh
. In the interactive configuration, set the appropriate PS1
.– thrig
Sep 13 '16 at 16:58
Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.
– JohnDoea
Sep 13 '16 at 18:00
Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.
– JohnDoea
Sep 13 '16 at 18:00
add a comment |
1 Answer
1
active
oldest
votes
it is exported, but the ~/.bashrc
or /etc/profile
or ~/.bash_profile
overwrite it without question. Run bash --norc
instead of parameterless bash
.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f309629%2fwhy-would-the-ps1-export-wont-carry-on-to-a-sub-process%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
it is exported, but the ~/.bashrc
or /etc/profile
or ~/.bash_profile
overwrite it without question. Run bash --norc
instead of parameterless bash
.
add a comment |
it is exported, but the ~/.bashrc
or /etc/profile
or ~/.bash_profile
overwrite it without question. Run bash --norc
instead of parameterless bash
.
add a comment |
it is exported, but the ~/.bashrc
or /etc/profile
or ~/.bash_profile
overwrite it without question. Run bash --norc
instead of parameterless bash
.
it is exported, but the ~/.bashrc
or /etc/profile
or ~/.bash_profile
overwrite it without question. Run bash --norc
instead of parameterless bash
.
edited Sep 13 '16 at 18:18
answered Sep 13 '16 at 16:37
Ipor SircerIpor Sircer
10.6k11024
10.6k11024
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f309629%2fwhy-would-the-ps1-export-wont-carry-on-to-a-sub-process%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Is
PS1
changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html– SiKing
Sep 13 '16 at 16:36
Shell internal variables such as
PS1
should not be exported, as something set forbash
is incompatible withzsh
. In the interactive configuration, set the appropriatePS1
.– thrig
Sep 13 '16 at 16:58
Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.
– JohnDoea
Sep 13 '16 at 18:00