Compare commits

...

3 Commits

Author SHA1 Message Date
3ea2e0cd8f v3.3.3
=====================================================================

--- Bug Fixes ----------------------------

- load static config files in all scwrypts contexts; not just groups
2023-08-18 12:40:14 -06:00
e0cbf58b3c v3.3.2
=====================================================================

--- Bug Fixes ----------------------------

- when using color, display properly in fzf
2023-08-11 08:39:30 -06:00
09c214f939 v3.3.1
=====================================================================

--- Bug Fixes ----------------------------

- fixed a bug with creating environment files for new scwrypts groups
2023-07-20 15:19:44 -06:00
3 changed files with 18 additions and 5 deletions

9
run
View File

@ -215,15 +215,16 @@ __RUN() {
do
local ENV_FILE=$(SCWRYPTS__GET_ENV_FILE "$ENV_NAME" "$GROUP")
source "$ENV_FILE" || FAIL 5 "missing or invalid environment '$GROUP/$ENV_NAME'"
for f in $(eval 'echo $SCWRYPTS_STATIC_CONFIG__'$GROUP)
do
source "$f" || FAIL 5 "invalid static config '$f'"
done
done
export ENV_NAME
}
for f in $(eval 'echo $SCWRYPTS_STATIC_CONFIG__'$SCWRYPT_GROUP)
do
source "$f" || FAIL 5 "invalid static config '$f'"
done
##########################################

View File

@ -43,6 +43,10 @@ SCWRYPTS__GET_ENV_FILE() {
SCWRYPTS__GET_ENV_NAMES | grep -q $NAME \
|| { ERROR "no environment '$NAME' exists"; return 1; }
[ -f "$SCWRYPTS_ENV_PATH/$GROUP/$NAME" ] || {
mkdir -p "$SCWRYPTS_ENV_PATH/$GROUP"
touch "$SCWRYPTS_ENV_PATH/$GROUP/$NAME"
}
[ -f "$SCWRYPTS_ENV_PATH/$GROUP/$NAME" ] \
|| { ERROR "missing environment file for '$GROUP/$NAME'"; return 2; }
}

View File

@ -128,7 +128,15 @@ FZF() {
exit 1
}
local SELECTION=$(fzf -i --height=30% --layout=reverse --prompt "$1 : " ${@:2})
local FZF_ARGS=()
FZF_ARGS+=(-i)
FZF_ARGS+=(--ansi)
FZF_ARGS+=(--bind=ctrl-c:cancel)
FZF_ARGS+=(--height=50%)
FZF_ARGS+=(--layout=reverse)
local SELECTION=$(fzf ${FZF_ARGS[@]} --layout=reverse --prompt "$1 : " ${@:2})
PROMPT "$1"
echo $SELECTION >&2
echo $SELECTION