Compare commits

..

6 Commits

Author SHA1 Message Date
b796021357 upgrade max supported python version to 3.12; drop support for python 3.9 (>3.10 required) 2024-05-07 23:18:43 -06:00
f5ec9cff8c conform scwrypts.scwrypts group definition to standard, required format; added short flag -c to make use more concise in quick non-scwrypts-runtime utility usage 2024-05-07 23:17:50 -06:00
9288e6642b cleaned up environment requirements for zsh plugin 2024-05-07 23:16:29 -06:00
71ba353fab - removed deprecated --no-log
- added experimental support for --output json
- added list-groups and --config to imporve utility outside of scwrypts
  runtime
2024-05-07 23:15:07 -06:00
28f60506bc remove old I3 config variables 2024-05-07 23:11:47 -06:00
7c7f015637 unalias f as well 2024-05-07 23:11:21 -06:00
5 changed files with 47 additions and 67 deletions

View File

@ -1,12 +1,3 @@
#
# typically you do not need to reload this plugin in a single session;
# if for some reason you do, you can run the following command and
# source this file again
#
# unset __SCWRYPTS_PLUGIN_LOADED
#
[[ $__SCWRYPTS_PLUGIN_LOADED =~ true ]] && return 0
#####################################################################
: \
@ -31,24 +22,21 @@ __SCWRYPTS_PARSE() {
#####################################################################
[ $SCWRYPTS_SHORTCUT ] && {
SCWRYPTS__ZSH_PLUGIN() {
SCWRYPTS__ZSH_PLUGIN() {
local SCWRYPT_SELECTION NAME TYPE GROUP
__SCWRYPTS_PARSE || { zle accept-line; return 0; }
RBUFFER="scwrypts --name $NAME --type $TYPE --group $GROUP"
zle accept-line
}
zle -N scwrypts SCWRYPTS__ZSH_PLUGIN
bindkey $SCWRYPTS_SHORTCUT scwrypts
unset SCWRYPTS_SHORTCUT
}
zle -N scwrypts SCWRYPTS__ZSH_PLUGIN
bindkey $SCWRYPTS_SHORTCUT scwrypts
unset SCWRYPTS_SHORTCUT
#####################################################################
[ $SCWRYPTS_BUILDER_SHORTCUT ] && {
SCWRYPTS__ZSH_BUILDER_PLUGIN() {
SCWRYPTS__ZSH_BUILDER_PLUGIN() {
local SCWRYPT_SELECTION NAME TYPE GROUP
__SCWRYPTS_PARSE || { echo >&2; zle accept-line; return 0; }
echo $SCWRYPT_SELECTION >&2
@ -61,17 +49,15 @@ __SCWRYPTS_PARSE() {
zle reset-prompt
LBUFFER="scwrypts --name $NAME --type $TYPE --group $GROUP -- "
}
zle -N scwrypts-builder SCWRYPTS__ZSH_BUILDER_PLUGIN
bindkey $SCWRYPTS_BUILDER_SHORTCUT scwrypts-builder
unset SCWRYPTS_BUILDER_SHORTCUT
}
zle -N scwrypts-builder SCWRYPTS__ZSH_BUILDER_PLUGIN
bindkey $SCWRYPTS_BUILDER_SHORTCUT scwrypts-builder
unset SCWRYPTS_BUILDER_SHORTCUT
#####################################################################
[ $SCWRYPTS_ENV_SHORTCUT ] && {
SCWRYPTS__ZSH_PLUGIN_ENV() {
SCWRYPTS__ZSH_PLUGIN_ENV() {
local RESET='reset'
local SELECTED=$(\
{ [ $SCWRYPTS_ENV ] && echo $RESET; scwrypts --list-envs; } \
@ -85,13 +71,10 @@ __SCWRYPTS_PARSE() {
|| RBUFFER="export SCWRYPTS_ENV=$SELECTED"
}
zle accept-line
}
zle -N scwrypts-setenv SCWRYPTS__ZSH_PLUGIN_ENV
bindkey $SCWRYPTS_ENV_SHORTCUT scwrypts-setenv
unset SCWRYPTS_ENV_SHORTCUT
}
#####################################################################
zle -N scwrypts-setenv SCWRYPTS__ZSH_PLUGIN_ENV
bindkey $SCWRYPTS_ENV_SHORTCUT scwrypts-setenv
unset SCWRYPTS_ENV_SHORTCUT
__SCWRYPTS_PLUGIN_LOADED=true
#####################################################################

View File

@ -25,7 +25,7 @@ export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
#####################################################################
DEFAULT_CONFIG="$SCWRYPTS_ROOT__scwrypts/zsh/lib/config.user.zsh"
DEFAULT_CONFIG="$SCWRYPTS_ROOT/zsh/lib/config.user.zsh"
source "$DEFAULT_CONFIG"
USER_CONFIG_OVERRIDES="$SCWRYPTS_CONFIG_PATH/config.zsh"

View File

@ -12,10 +12,7 @@ SCWRYPTS__RUN() { # context wrapper to run scwrypts within scwrypts
local EXIT_CODE=0
((SUBSCWRYPT+=1))
SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL \
SUBSCWRYPT=$SUBSCWRYPT \
$SCWRYPTS_ROOT__scwrypts/scwrypts $@
SUBSCWRYPT=$SUBSCWRYPT $SCWRYPTS_ROOT/scwrypts $@
EXIT_CODE=$?
((SUBSCWRYPT-=1))

View File

@ -94,7 +94,7 @@ SCWRYPTS__GET_RUNSTRING() {
}
RUNSTRING="SCWRYPTS_ENV=$ENV_NAME; $RUNSTRING"
RUNSTRING="source $SCWRYPTS_ROOT__scwrypts/zsh/lib/import.driver.zsh; $RUNSTRING"
RUNSTRING="source $SCWRYPTS_ROOT/zsh/lib/import.driver.zsh; $RUNSTRING"
local _VIRTUALENV=$(eval echo '$SCWRYPTS_VIRTUALENV_PATH__'$SCWRYPT_GROUP'/$SCWRYPT_TYPE/bin/activate')
[ -f $_VIRTUALENV ] && RUNSTRING="source $_VIRTUALENV; $RUNSTRING"

View File

@ -124,7 +124,7 @@ UPDATE_VIRTUALENV__scwrypts__py() {
PIP_INSTALL_ARGS+=(--no-cache-dir)
PIP_INSTALL_ARGS+=(-r requirements.txt)
cd "$SCWRYPTS_ROOT__scwrypts/py"
cd "$SCWRYPTS_ROOT/py"
pip install ${PIP_INSTALL_ARGS[@]}
}
@ -161,7 +161,7 @@ ACTIVATE_VIRTUALENV__scwrypts__zx() {
UPDATE_VIRTUALENV__scwrypts__zx() {
local NPM_INSTALL_ARGS=()
cd "$SCWRYPTS_ROOT__scwrypts/zx"
cd "$SCWRYPTS_ROOT/zx"
npm install ${NPM_INSTALL_ARGS[@]}
}