diff --git a/rt/complete/err.txt b/rt/complete/err.txt index f0d3ac40e..31e5910eb 100644 --- a/rt/complete/err.txt +++ b/rt/complete/err.txt @@ -2,7 +2,7 @@ step 1 lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version =========================== -Modules based on Lua: Version 8.6.16 2022-03-22 14:19 -05:00 +Modules based on Lua: Version 8.7.32 2023-08-28 12:42 -05:00 by Robert McLay mclay@tacc.utexas.edu =========================== step 2 @@ -95,3 +95,7 @@ set_shell_function("_bash_completion_spack","\ $subfunction;\ COMPREPLY=($(compgen -W \"$SPACK_COMPREPLY\" -- \"$cur\"));\ fi","") +=========================== +step 9 +lua ProjectDIR/src/lmod.in.lua shell --regression_testing load foo/1.0 +=========================== diff --git a/rt/complete/out.txt b/rt/complete/out.txt index 6256279d0..1c84d2750 100644 --- a/rt/complete/out.txt +++ b/rt/complete/out.txt @@ -130,3 +130,20 @@ MODULEPATH=ProjectDIR/rt/complete/mf; export MODULEPATH; _ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/complete/mf",},systemBaseMPATH="ProjectDIR/rt/complete/mf",}'; export _ModuleTable_; +=========================== +step 9 +lua ProjectDIR/src/lmod.in.lua shell --regression_testing load foo/1.0 +=========================== +LOADEDMODULES=foo/1.0; +export LOADEDMODULES; +MODULEPATH=ProjectDIR/rt/complete/mf; +export MODULEPATH; +_LMFILES_=ProjectDIR/rt/complete/mf/foo/1.0.lua; +export _LMFILES_; +_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={foo={fn="ProjectDIR/rt/complete/mf/foo/1.0.lua",fullName="foo/1.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="foo/1.0",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/complete/mf",},systemBaseMPATH="ProjectDIR/rt/complete/mf",}'; +export _ModuleTable_; +[[ -n "${BASH_VERSION:-}" ]] && complete -o default -F foo_completion foo; +foo () { echo foo; +}; +foo_completion () { COMPREPLY=(bar baz); +}; diff --git a/rt/sh_to_modulefile/err.txt b/rt/sh_to_modulefile/err.txt index 7315fa512..316507199 100644 --- a/rt/sh_to_modulefile/err.txt +++ b/rt/sh_to_modulefile/err.txt @@ -2,7 +2,7 @@ step 1 lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version =========================== -Modules based on Lua: Version 8.7.12 2022-08-18 15:45 -05:00 +Modules based on Lua: Version 8.7.32 2023-08-28 12:42 -05:00 by Robert McLay mclay@tacc.utexas.edu =========================== step 2 diff --git a/rt/sh_to_modulefile/out.txt b/rt/sh_to_modulefile/out.txt index 2bcb42efe..bf358903f 100644 --- a/rt/sh_to_modulefile/out.txt +++ b/rt/sh_to_modulefile/out.txt @@ -143,6 +143,7 @@ banner () { local NONE='\\033[0m'; echo "${RED}${str}${NONE}"; }; +[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; alias fooAlias=foobin\ -q\ -l; fooFunc () { echo "arg1: $1"; @@ -162,7 +163,6 @@ save_args () { done; echo " "; }; -[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; =========================== step 10 lua ProjectDIR/src/lmod.in.lua shell --regression_testing show wrapperSh/1.0 @@ -185,6 +185,7 @@ banner () { local NONE='\\033[0m'; echo "${RED}${str}${NONE}"; }; +[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; alias fooAlias=foobin\ -q\ -l; fooFunc () { echo "arg1: $1"; @@ -204,7 +205,6 @@ save_args () { done; echo " "; }; -[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; =========================== step 12 lua ProjectDIR/src/lmod.in.lua shell --regression_testing list @@ -235,12 +235,12 @@ unset _LMFILES_; _ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/sh_to_modulefile/mf",},systemBaseMPATH="ProjectDIR/rt/sh_to_modulefile/mf",}'; export _ModuleTable_; unset -f banner 2> /dev/null || true; +[[ -n "${BASH_VERSION:-}" ]] && complete -r xyz123; unalias fooAlias 2> /dev/null || true; unset -f fooFunc 2> /dev/null || true; unset -f junk 2> /dev/null || true; unset -f my_help 2> /dev/null || true; unset -f save_args 2> /dev/null || true; -[[ -n "${BASH_VERSION:-}" ]] && complete -r xyz123; =========================== step 15 lua ProjectDIR/src/lmod.in.lua shell --regression_testing load brokenSh/1.0 @@ -274,6 +274,7 @@ banner () { local NONE='\\033[0m'; echo "${RED}${str}${NONE}"; }; +[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; alias fooAlias=foobin\ -q\ -l; fooFunc () { echo "arg1: $1"; @@ -293,7 +294,6 @@ save_args () { done; echo " "; }; -[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; =========================== step 17 lua ProjectDIR/src/lmod.in.lua shell --regression_testing save @@ -326,6 +326,7 @@ banner () { local NONE='\\033[0m'; echo "${RED}${str}${NONE}"; }; +[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; alias fooAlias=foobin\ -q\ -l; fooFunc () { echo "arg1: $1"; @@ -345,7 +346,6 @@ save_args () { done; echo " "; }; -[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; =========================== step 19 lua ProjectDIR/src/lmod.in.lua shell --regression_testing --mt @@ -374,6 +374,7 @@ banner () { local NONE='\\033[0m'; echo "${RED}${str}${NONE}"; }; +[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; alias fooAlias=foobin\ -q\ -l; fooFunc () { echo "arg1: $1"; @@ -393,7 +394,6 @@ save_args () { done; echo " "; }; -[[ -n "${BASH_VERSION:-}" ]] && complete -F _xyz123 xyz123; =========================== step 21 lua ProjectDIR/src/lmod.in.lua shell --regression_testing list