container: finance: lib_root/completion: add Pluggable support

- Adds Pluggable auto-(un)load support
- Adds plugin dispatcher for interpreter
- Refactors to support new Pluggable system
- Updates usage help and improves documentation
This commit is contained in:
2025-12-19 10:59:30 -08:00
parent 2a6504f872
commit e77c25f0c9
2 changed files with 100 additions and 63 deletions

View File

@@ -145,7 +145,7 @@ function docker-finance::completion()
mapfile -t _root < <({
find "${DOCKER_FINANCE_CONTAINER_PLUGINS}"/root "${_args[@]}" -printf 'plugins/custom/%P\n' 2>/dev/null
find "${DOCKER_FINANCE_CONTAINER_REPO}"/plugins/root "${_args[@]}" -printf 'plugins/repo/%P\n' 2>/dev/null
find "${DOCKER_FINANCE_CONTAINER_REPO}"/src/root/macro "${_args[@]}" -printf 'macro/%P\n' 2>/dev/null
find "${DOCKER_FINANCE_CONTAINER_REPO}"/src/root/macro "${_args[@]}" -printf 'macros/repo/%P\n' 2>/dev/null
})
declare -r _root
mapfile -t _reply < <(compgen -W "help ${_root[*]}" -- "$_cur")