Install: add a question for which environment this is and add it to the prompt.
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@ rewrite_prompt()
|
|||||||
[ $UID -eq "0" ] && UC=$R # root's color
|
[ $UID -eq "0" ] && UC=$R # root's color
|
||||||
|
|
||||||
# rewrite prompt
|
# rewrite prompt
|
||||||
PS1="[\\t] ${G}\u@\h> \${NEW_PWD} ${C}\$(git_branch)\${NONE}${NONE}\n$ "
|
PS1="\${__prompt_environment}[\\t] ${G}\u@\h> \${NEW_PWD} ${C}\$(git_branch)\${NONE}${NONE}\n$ "
|
||||||
}
|
}
|
||||||
|
|
||||||
# adds ~/.ssh/config to the ssh autocomplete
|
# adds ~/.ssh/config to the ssh autocomplete
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ for file in ~/.bash/{shell,commands,prompt,aliases}; do
|
|||||||
done;
|
done;
|
||||||
unset file;
|
unset file;
|
||||||
|
|
||||||
|
[ -f ~/.bash_environment ] && source ~/.bash_environment;
|
||||||
|
|||||||
@@ -90,5 +90,9 @@ for sourceFile in .*; do
|
|||||||
ln -vs "$PWD/$sourceFile" "$targetFile";
|
ln -vs "$PWD/$sourceFile" "$targetFile";
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
touch ~/.bash_environment;
|
||||||
|
read -p "Please, enter your environment: ";
|
||||||
|
echo -e "export __prompt_environment='[$REPLY] '" | tee ~/.bash_environment > /dev/null;
|
||||||
|
|
||||||
echo "Done.";
|
echo "Done.";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user