diff --git a/zflai_memory_keeper b/-zflai-disk-jokey similarity index 100% rename from zflai_memory_keeper rename to -zflai-disk-jokey diff --git a/zflai_check_start b/-zflai_check_start similarity index 75% rename from zflai_check_start rename to -zflai_check_start index 5ab9e46..7fb9ebf 100644 --- a/zflai_check_start +++ b/-zflai_check_start @@ -22,10 +22,8 @@ fi # Running (not much idle, that was checked above) ? (( ZFLAI_FD != 0 )) && return 0 -# Not running, or closed to prevent race condition - start -# a new agent. The ARGV0 assignment will not work untill -# zflai_memory_keeper is a command not a function. -builtin exec {ZFLAI_FD}> >(ARGV0=zflai-memory-keeper zflai_memory_keeper "$ZUID_ID" "$ZUID_CODENAME") || return 1 +# Not running, or closed to prevent race condition - start a new agent +builtin exec {ZFLAI_FD}> >(-zflai-disk-jokey "$ZUID_ID" "$ZUID_CODENAME") || return 1 return 0 diff --git a/zflai.plugin.zsh b/zflai.plugin.zsh index 0d029f1..cc10ae8 100644 --- a/zflai.plugin.zsh +++ b/zflai.plugin.zsh @@ -5,9 +5,9 @@ typeset -g ZFLAI_SRC_DIR="${0:h}" zmodload zsh/datetime zmodload zsh/system -autoload -- zflai_check_start zflai_memory_keeper \ +autoload -- -zflai-disk-jokey -zflai_check_start -zflai_learn_table \ -zflai_read_ini_file -zflai_read_db_defs -zflai_read_table_defs \ - -zflai_learn_table -zflai_store -zflai_sqlite_store + -zflai_store -zflai_sqlite_store typeset -g ZFLAI_FD=0 ZFLAI_NULL_FD=0 ZFLAI_LAST_ACTION="$EPOCHSECONDS" ZFLAI_KEEP_ALIVE=45 @@ -26,13 +26,13 @@ function zflai_refresh_config { # # $1 - log message function zflai-log { - zflai_check_start + -zflai_check_start print -u $ZFLAI_FD -r -- "L $1" ZFLAI_LAST_ACTION="$EPOCHSECONDS" } function zflai-ctable { - zflai_check_start + -zflai_check_start print -u $ZFLAI_FD -r -- "T $1" ZFLAI_LAST_ACTION="$EPOCHSECONDS" }