As I'm new to Modules, I'm gratified to see that this list is alive. So
here's a question: Has anyone solved the problem of shell portability when
writing
aliases? For example, the way one sets the prompt is different in csh-type
shells and in sh-type shells. So is the quoting behavior. This means
that I end up saying stuff like this in my modulefiles:
if { [ module-info shelltype ] == "csh" } {
# csh (and tcsh etc) alias generation
} else {
# sh (and ksh and bash etc) alias / function generation
}
I would prefer it if there was a way for me as the modulefile write not to
have to worry about these differences. I realize this means writing a
language that generates the appropriate code for each shell. Modules has
been around for a while so perhaps this has been done. Has it? Here or
anywhere?
Or perhaps there is a different solution to shell portabililty?
-d
|