- profile.bash: simplified preexec_init (early return), extracted ___keep_complete helper for @/@@ completion wrappers - profile.zsh: add-zsh-hook preexec, wrapper function, @/@@ aliases, completions via compdef - profile.sh: POSIX-compatible for sh/dash/ksh. Wrapper function, @/@@ aliases. No preexec or completions. - profile.csh: alias-based keep wrapper, @/@@ aliases. No preexec or completions. - modulefile: adds KEEP_SH_PROFILE, KEEP_ZSH_PROFILE, KEEP_CSH_PROFILE - README: updated Shell Integration table and Shell Completion section
21 lines
554 B
Plaintext
21 lines
554 B
Plaintext
#%Module
|
|
|
|
set fn $ModulesCurrentModulefile
|
|
set fn [file normalize $ModulesCurrentModulefile]
|
|
|
|
if {[file type $fn] eq "link"} {
|
|
set fn [ exec readlink -f $fn]
|
|
}
|
|
|
|
set mydir_base [ file dirname $fn ]
|
|
#set mydir_base [ file dirname $mydir_base ]
|
|
set mydir [ file normalize $mydir_base ]
|
|
|
|
module-whatis Keep
|
|
|
|
prepend-path PATH $mydir/bin
|
|
setenv KEEP_BASH_PROFILE ${mydir}/profile.bash
|
|
setenv KEEP_ZSH_PROFILE ${mydir}/profile.zsh
|
|
setenv KEEP_SH_PROFILE ${mydir}/profile.sh
|
|
setenv KEEP_CSH_PROFILE ${mydir}/profile.csh
|