mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-28 02:19:39 +02:00
modulecmd: module sub-command --help bugs fixed
This commit is contained in:
@@ -262,6 +262,7 @@ subcommand_generic0() {
|
||||
args+=( "$1" )
|
||||
;;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
if (( ${#args[@]} > 0 )); then
|
||||
std::die 3 "%s %s: %s\n" \
|
||||
@@ -459,7 +460,7 @@ subcommand_load() {
|
||||
while (($# > 0)); do
|
||||
case $1 in
|
||||
-H | --help )
|
||||
print_help "${subcommand_load}"
|
||||
print_help "${subcommand}"
|
||||
;;
|
||||
-f | --force )
|
||||
opts+=(' -f')
|
||||
@@ -2294,6 +2295,24 @@ if [[ -z "${Subcommands[${subcommand}]}" ]]; then
|
||||
std::die 1 "${CMD}: unknown sub-command -- ${subcommand}\n"
|
||||
fi
|
||||
|
||||
case ${subcommand} in
|
||||
add )
|
||||
subcommand='load'
|
||||
;;
|
||||
display )
|
||||
subcommand='show'
|
||||
;;
|
||||
keyword )
|
||||
subcommand='apropos'
|
||||
;;
|
||||
rm )
|
||||
subcommand='unload'
|
||||
;;
|
||||
switch )
|
||||
subcommand='swap'
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -n ${PMODULES_ENV} ]]; then
|
||||
eval "$("${base64}" -d <<< "${PMODULES_ENV}" 2>/dev/null)"
|
||||
if [[ -z ${Version} ]] || [[ ${Version} != ${PMODULES_VERSION} ]]; then
|
||||
@@ -2335,7 +2354,7 @@ if (( ${#GroupDepths[@]} == 0 )); then
|
||||
fi
|
||||
|
||||
case ${subcommand} in
|
||||
load|purge|search|switch )
|
||||
load|purge|search|swap )
|
||||
declare -r tmpfile=$( ${mktemp} /tmp/Pmodules.XXXXXX ) \
|
||||
|| std::die 1 "Oops: unable to create tmp file!"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user