"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "init/zsh-functions/_module.in" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

_module.in  (modules-5.1.1.tar.bz2):_module.in  (modules-5.2.0.tar.bz2)
skipping to change at line 23 skipping to change at line 23
fi fi
} }
_module_savelist() { _module_savelist() {
module savelist --color=never -s -t 2>&1 | sed ' module savelist --color=never -s -t 2>&1 | sed '
/No named collection\.$/d; /No named collection\.$/d;
/Named collection list$/d; /Named collection list$/d;
/:$/d;' /:$/d;'
} }
_module_stashlist() {
module stashlist --color=never -s -t 2>&1 | sed '
/No stash collection\.$/d;
/Stash collection list$/d;
/:$/d;'
}
_module_not_yet_loaded() { _module_not_yet_loaded() {
_module_avail ${1:-} | sort | @SED_ERE@ "\%^(${LOADEDMODULES//:/|})$%d" _module_avail ${1:-} | sort | @SED_ERE@ "\%^(${LOADEDMODULES//:/|})$%d"
} }
_module_avail_mods() { _module_avail_mods() {
local -a avail_mods; local -a avail_mods;
local suffix=' '; local suffix=' ';
avail_mods=(${$(_module_avail $cur ${1:-})}) avail_mods=(${$(_module_avail $cur ${1:-})})
# do not append space to word completed if it is a directory (ends with /) # do not append space to word completed if it is a directory (ends with /)
skipping to change at line 50 skipping to change at line 57
compadd -S "$suffix" -a avail_mods && ret=0 compadd -S "$suffix" -a avail_mods && ret=0
} }
_module_saved_colls() { _module_saved_colls() {
local -a saved_colls; local -a saved_colls;
saved_colls=(${$(_module_savelist)}) saved_colls=(${$(_module_savelist)})
_describe -t saved-colls 'saved collections' saved_colls && ret=0 _describe -t saved-colls 'saved collections' saved_colls && ret=0
} }
_module_stash_colls() {
local -a stash_colls;
stash_colls=(${$(_module_stashlist)})
_describe -t stash-colls 'stash collections' stash_colls && ret=0
}
_module_notloaded_mods() { _module_notloaded_mods() {
local -a not_yet_loaded_mods; local -a not_yet_loaded_mods;
local suffix=' '; local suffix=' ';
not_yet_loaded_mods=(${$(_module_not_yet_loaded ${1:-})}) not_yet_loaded_mods=(${$(_module_not_yet_loaded ${1:-})})
# do not append space to word completed if it is a directory (ends with /) # do not append space to word completed if it is a directory (ends with /)
for val in $not_yet_loaded_mods; do for val in $not_yet_loaded_mods; do
if [ "${val: -1:1}" = '/' ]; then if [ "${val: -1:1}" = '/' ]; then
suffix='' suffix=''
break break
skipping to change at line 155 skipping to change at line 169
'paths:Print path of matching available modules' 'paths:Print path of matching available modules'
'source:Execute scriptfile(s)' 'source:Execute scriptfile(s)'
'append-path:Append value to environment variable' 'append-path:Append value to environment variable'
'prepend-path:Prepend value to environment variable' 'prepend-path:Prepend value to environment variable'
'remove-path:Remove value from environment variable' 'remove-path:Remove value from environment variable'
'clear:Reset Modules-specific runtime information' 'clear:Reset Modules-specific runtime information'
'config:Display or set Modules configuration' 'config:Display or set Modules configuration'
'sh-to-mod:Make modulefile from script env changes' 'sh-to-mod:Make modulefile from script env changes'
'edit:Open modulefile in editor' 'edit:Open modulefile in editor'
'state:Display Modules state' 'state:Display Modules state'
'lint:Check syntax of modulefile'
'mod-to-sh:Make shell code from modulefile env changes'
'reset:Restore initial environment'
'stash:Save current environment and reset'
'stashclear:Remove all stash collections'
'stashlist:List all stash collections'
'stashpop:Restore then remove stash collection'
'stashrm:Remove stash collection'
'stashshow:Display information about stash collection'
) )
# show commands only with compatible options # show commands only with compatible options
if (( !$+opt_args[-h] && !$+opt_args[--help] \ if (( !$+opt_args[-h] && !$+opt_args[--help] \
&& !$+opt_args[-V] && !$+opt_args[--version] )); then && !$+opt_args[-V] && !$+opt_args[--version] )); then
_describe -t cmds 'Module Sub-Commands' cmds && ret=0 _describe -t cmds 'Module Sub-Commands' cmds && ret=0
fi fi
;; ;;
(arg) (arg)
local cmd="${words[1]}" local cmd="${words[1]}"
local cur="${words[CURRENT]}" local cur="${words[CURRENT]}"
skipping to change at line 216 skipping to change at line 239
'--long:Display output in long format' '--long:Display output in long format'
'-t:Display output in terse format' '-t:Display output in terse format'
'--terse:Display output in terse format' '--terse:Display output in terse format'
'-j:Display output in JSON format' '-j:Display output in JSON format'
'--json:Display output in JSON format' '--json:Display output in JSON format'
'-o:Define elements to output in addition to module names' '-o:Define elements to output in addition to module names'
'--output=:Define elements to output in addition to module nam es' '--output=:Define elements to output in addition to module nam es'
) )
_describe -t opts 'Switches' opts && ret=0 _describe -t opts 'Switches' opts && ret=0
;; ;;
(stashlist)
_arguments \
'(-l --long)'{-l,--long}'[Display output in long format]' \
'(-t --terse)'{-t,--terse}'[Display output in terse format]' \
'(-j --json)'{-j,--json}'[Display output in JSON format]' && r
et=0
;;
(stashpop|stashshow|stashrm)
_alternative 'avail-stashs:collections:{_module_stash_colls}' \
&& ret=0
;;
(clear) (clear)
_arguments \ _arguments \
'(-f --force)'{-f,--force}'[Skip confirmation dialog]' && ret= 0 '(-f --force)'{-f,--force}'[Skip confirmation dialog]' && ret= 0
;; ;;
(restore|save|saveshow|saverm|is-saved) (restore|save|saveshow|saverm|is-saved)
_alternative 'avail-colls:collections:{_module_saved_colls}' \ _alternative 'avail-colls:collections:{_module_saved_colls}' \
&& ret=0 && ret=0
;; ;;
(rm|del|remove|unload) (rm|del|remove|unload)
_arguments \ _arguments \
skipping to change at line 292 skipping to change at line 325
(remove-path) (remove-path)
_arguments \ _arguments \
'(-d --delim)'{-d,--delim}'[Path element separator]' \ '(-d --delim)'{-d,--delim}'[Path element separator]' \
'--index[Remove path element with index]' \ '--index[Remove path element with index]' \
&& ret=0 && ret=0
;; ;;
(config) (config)
_arguments \ _arguments \
'--dump-state[Report each state value of current Modules execu tion]' \ '--dump-state[Report each state value of current Modules execu tion]' \
'--reset[Unset environment variable relative to configuration key]' \ '--reset[Unset environment variable relative to configuration key]' \
'1:configuration key:(advanced_version_spec auto_handling avai l_indepth avail_output avail_terse_output collection_pin_version collection_pin_ tag collection_target color colors contact editor extended_default extra_sitecon fig home icase implicit_default implicit_requirement list_output list_terse_outp ut locked_configs mcookie_check mcookie_version_check ml nearly_forbidden_days p ager quarantine_support rcfile redirect_output run_quarantine search_match set_s hell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277) ' \ '1:configuration key:(advanced_version_spec auto_handling avai l_indepth avail_output avail_terse_output collection_pin_version collection_pin_ tag collection_target color colors contact editor extended_default extra_sitecon fig home icase implicit_default implicit_requirement list_output list_terse_outp ut locked_configs mcookie_check mcookie_version_check ml nearly_forbidden_days p ager protected_envvars quarantine_support rcfile redirect_output reset_target_st ate run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_s hell_debug tag_abbrev tag_color_name tcl_linter term_background term_width unloa d_match_order variant_shortcut verbosity wa_277)' \
&& ret=0 && ret=0
;; ;;
(edit) (edit)
_arguments \ _arguments \
"*::modulefile:{_module_avail_mods $cur}" && ret=0 "*::modulefile:{_module_avail_mods $cur}" && ret=0
;; ;;
(lint)
_arguments \
'(-i --icase)'{-i,--icase}'[Case insensitive match]' \
'(-a --all)'{-a,--all}'[Include hidden modules in search]' \
"*::modulefile:{_module_avail_mods $cur}" && ret=0
;;
(mod-to-sh)
_arguments \
'--auto[Enable automated module handling mode]' \
'--no-auto[Disable automated module handling mode]' \
'(-f --force)'{-f,--force}'[By-pass dependency consistency]' \
'(-i --icase)'{-i,--icase}'[Case insensitive match]' \
"*::modulefile:{_module_notloaded_mods $cur}" && ret=0
;;
esac esac
;; ;;
esac esac
} }
_module "$@" _module "$@"
# vim:set tabstop=3 shiftwidth=3 expandtab autoindent: # vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
 End of changes. 6 change blocks. 
1 lines changed or deleted 49 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)