mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
install: add --with-noglob-eval-shells configure opt
Introduce the --with-noglob-eval-shells configure option to choose at installation time if the pathname expansion should be disabled or not in the module function to evaluate shell code produced by modulecmd.tcl, for the shells listed in option value.
This commit is contained in:
1
Makefile
1
Makefile
@@ -311,6 +311,7 @@ sed -e 's|@prefix@|$(prefix)|g' \
|
||||
-e 's|@implicitrequirement@|$(setimplicitrequirement)|g' \
|
||||
-e 's|@availindepth@|$(setavailindepth)|g' \
|
||||
-e 's|@silentshdbgsupport@|$(setsilentshdbgsupport)|g' \
|
||||
-e 's|@noglobevalshells@|$(noglobevalshells)|g' \
|
||||
-e 's|@ml@|$(setml)|g' \
|
||||
-e 's|@setshellstartup@|$(setsetshellstartup)|g' \
|
||||
-e 's|@mcookieversioncheck@|$(setmcookieversioncheck)|g' \
|
||||
|
||||
@@ -140,6 +140,9 @@ bashcompletiondir := @bashcompletiondir@
|
||||
fishcompletiondir := @fishcompletiondir@
|
||||
zshcompletiondir := @zshcompletiondir@
|
||||
|
||||
# shell-specific behaviors
|
||||
noglobevalshells := @noglobevalshells@
|
||||
|
||||
# command location
|
||||
TCLSH := @TCLSH@
|
||||
PYTHON := @PYTHON@
|
||||
|
||||
21
configure
vendored
21
configure
vendored
@@ -39,7 +39,7 @@ searchmatch modulepath loadedmodules quarantinevars wa277 advversspec ml \
|
||||
windowssupport nearlyforbiddendays implicitrequirement tagabbrev \
|
||||
tagcolorname mcookieversioncheck availoutput availterseoutput listoutput \
|
||||
listterseoutput editor variantshortcut bashcompletiondir fishcompletiondir \
|
||||
zshcompletiondir"
|
||||
zshcompletiondir noglobevalshells"
|
||||
libarglist=
|
||||
|
||||
# flags to know if argument has been specified on command-line
|
||||
@@ -127,6 +127,7 @@ variantshortcut=
|
||||
bashcompletiondir=
|
||||
fishcompletiondir=
|
||||
zshcompletiondir=
|
||||
noglobevalshells='sh:bash:ksh'
|
||||
|
||||
|
||||
# check if output/error channels are attached to terminal
|
||||
@@ -391,6 +392,12 @@ Optional Packages:
|
||||
SHORTCUTLIST are separated by \`:') [$variantshortcut]
|
||||
--with-editor=BIN name or full path of default editor program to use to
|
||||
edit modulefiles [$editor]
|
||||
--with-noglob-eval-shells=LIST
|
||||
for the listed shells disable pathname expansion in
|
||||
module shell function to evaluate shell code
|
||||
produced by modulecmd.tcl. shells accepted in LIST
|
||||
are \`sh', \`bash', \`ksh' and \`zsh' (elements in
|
||||
LIST are separated by \`:') [$noglobevalshells]
|
||||
--with-modulepath=PATHLIST
|
||||
default modulepaths to set in default configuration
|
||||
file to be enabled (each path in PATHLIST should
|
||||
@@ -760,6 +767,18 @@ for arg in "$@"; do
|
||||
variantshortcut=$(get_package_value "$arg") ;;
|
||||
--with-editor=*|--without-editor)
|
||||
editor=$(get_package_value "$arg") ;;
|
||||
--with-noglob-eval-shells*|--without-noglob-eval-shells)
|
||||
noglobevalshells=$(get_package_value "$arg" "$noglobevalshells") ;
|
||||
allowedval=" sh bash ksh zsh " ;
|
||||
ORIG_IFS=$IFS ;
|
||||
IFS=: ;
|
||||
for val in $noglobevalshells; do
|
||||
if [ "${allowedval// $val /}" = "$allowedval" ]; then
|
||||
echo_error "Bad value '$val' set in option \`--with-noglob-eval-shells'"\
|
||||
"Values allowed in list are:$allowedval"
|
||||
fi ;
|
||||
done ;
|
||||
IFS=$ORIG_IFS ;;
|
||||
--with-modulepath=*|--without-modulepath)
|
||||
modulepath=$(get_package_value "$arg") ;;
|
||||
--with-loadedmodules=*|--without-loadedmodules)
|
||||
|
||||
@@ -97,6 +97,8 @@ set install_bashcompletiondir "@bashcompletiondir@"
|
||||
set install_fishcompletiondir "@fishcompletiondir@"
|
||||
set install_zshcompletiondir "@zshcompletiondir@"
|
||||
|
||||
set install_noglobevalshells "@noglobevalshells@"
|
||||
|
||||
# command location
|
||||
set install_tclsh "@TCLSH@"
|
||||
set install_python "@PYTHON@"
|
||||
|
||||
@@ -92,8 +92,8 @@ array set g_config_defs [list\
|
||||
ml {MODULES_ML @ml@ 0 {0 1}}\
|
||||
nearly_forbidden_days {MODULES_NEARLY_FORBIDDEN_DAYS @nearlyforbiddendays@\
|
||||
0 {0 365} {} {} intbe}\
|
||||
noglob_eval_shells {MODULES_NOGLOB_EVAL_SHELLS sh:bash:ksh 0 {sh bash ksh\
|
||||
zsh} {} {} eltlist}\
|
||||
noglob_eval_shells {MODULES_NOGLOB_EVAL_SHELLS {@noglobevalshells@} 0 {sh\
|
||||
bash ksh zsh} {} {} eltlist}\
|
||||
pager {MODULES_PAGER {@pagercmd@} 0}\
|
||||
rcfile {MODULERCFILE <undef> 0}\
|
||||
redirect_output {MODULES_REDIRECT_OUTPUT 1 0 {0 1}}\
|
||||
|
||||
Reference in New Issue
Block a user