From 04283cbcb5ce3f5f7aa2cdd5254052be6e236871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Mon, 15 Aug 2022 20:54:42 +0800 Subject: [PATCH] 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 \e[1;3m\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 \e[1;3m\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