commit 04283cbcb5ce3f5f7aa2cdd5254052be6e236871
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-08-15T12:54:42Z |
| subject | Changed env sourcing order |
commit 04283cbcb5ce3f5f7aa2cdd5254052be6e236871
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-08-15T12:54:42Z
Changed env sourcing order
---
bash/rbashrc | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/bash/rbashrc b/bash/rbashrc
index dddeab5..21378f7 100644
--- a/bash/rbashrc
+++ b/bash/rbashrc
@@ -10,20 +10,19 @@ __SCRIPT=$BASH_SOURCE
RBASH_HOME="$HOME/.rbash"
RBASH_SOURCES="$RBASH_HOME/sources"
RBASH_CONFIG="$RBASH_HOME/config"
+RBASH_ENV="$RBASH_HOME/env"
RBASH_REMOTE="https://git.k8s.astropenguin.net"
RBASH_REPO="penguin/utils"
RBASH_PATH="bash"
+export PS1='This is <MACHINE_NAME>\e[1;3<COLOR_CODE>m<MACHINE_COLORED_NAME>\e[0m: \w\n\$ '
+export EDITOR=vim
+
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
-# Source for Custom bash ENV
-if [ -f ~/.rbashenv ]; then
- . ~/.rbashenv
-fi
-
# The merged sources
RBASH_MERGED="$RBASH_SOURCES/merged"
@@ -289,8 +288,10 @@ function r2dissource {
rm -r "$_dis" "$RBASH_SOURCES"
}
-export PS1='This is <MACHINE_NAME>\e[1;3<COLOR_CODE>m<MACHINE_COLORED_NAME>\e[0m: \w\n\$ '
-export EDITOR=vim
+# Source for custom bash env, allows overriding
+if [ -f "$RBASH_ENV" ]; then
+ source "$RBASH_ENV"
+fi
# Create default source config
if [ ! -f "$RBASH_CONFIG" ]; then