Minor improvement to sz.env load process
This commit is contained in:
parent
9ebde5fb79
commit
f4c0bb36c1
|
@ -3,4 +3,6 @@
|
||||||
if [[ ! "$-" =~ i ]]; then
|
if [[ ! "$-" =~ i ]]; then
|
||||||
LOAD_EXIT=1
|
LOAD_EXIT=1
|
||||||
echo "Non interactive session ($-) , stopping load of shell environment" 1>&2
|
echo "Non interactive session ($-) , stopping load of shell environment" 1>&2
|
||||||
|
else
|
||||||
|
reset
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10,3 +10,6 @@ done
|
||||||
NEWPATH="$NEWPATH:$OLDPATH"
|
NEWPATH="$NEWPATH:$OLDPATH"
|
||||||
export PATH="$NEWPATH"
|
export PATH="$NEWPATH"
|
||||||
unset NEWPATH OLDPATH colon entry search
|
unset NEWPATH OLDPATH colon entry search
|
||||||
|
|
||||||
|
[[ -n "${DBG}" ]] && echo "${PATH//:/\n}"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||||
|
|
||||||
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
|
export ENVMAN_LOAD=''
|
||||||
|
|
||||||
|
if [ -s "$HOME/.config/envman/load.sh" ]; then
|
||||||
|
[[ -n "${DBG}" ]] && echo "Loading envman"
|
||||||
|
source "$HOME/.config/envman/load.sh"
|
||||||
|
|
||||||
|
[[ -n "${DBG}" ]] && echo "${PATH//:/\n}"
|
||||||
|
fi
|
||||||
|
|
||||||
if is_cmd webi; then
|
if is_cmd webi; then
|
||||||
. <(webi --init "${SHELL##*/}")
|
. <(webi --init "${SHELL##*/}")
|
||||||
|
|
|
@ -57,6 +57,9 @@ if is_sourced; then
|
||||||
-exec sh -c '
|
-exec sh -c '
|
||||||
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "ID_*" -not -name "PATH_*" -print | sort
|
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "ID_*" -not -name "PATH_*" -print | sort
|
||||||
' shell '{}' ';' \
|
' shell '{}' ';' \
|
||||||
|
-exec sh -c '
|
||||||
|
find "$1" -xdev -maxdepth 1 -type f -name "PATH_zz_cleanup.env"
|
||||||
|
' shell '{}' ';' \
|
||||||
| sed -e 's/^/load_next "/; s/$/";/'
|
| sed -e 's/^/load_next "/; s/$/";/'
|
||||||
)"
|
)"
|
||||||
if [ -n "$DBG_NO_SZ_LOAD" ]; then
|
if [ -n "$DBG_NO_SZ_LOAD" ]; then
|
||||||
|
|
Loading…
Reference in New Issue