mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-08-02 01:33:37 +02:00
modulecmd: fix output of module avail
- for directories outside the hierarchy the header did not include the directory name.
This commit is contained in:
@@ -1042,8 +1042,12 @@ subcommand_avail() {
|
||||
local string
|
||||
for string in "${pattern[@]}"; do
|
||||
for dir in "${modulepath[@]}"; do
|
||||
local group="${dir/${PMODULES_ROOT}\/}"
|
||||
group="${group%%/*}"
|
||||
if [[ ${dir} =~ ${PMODULES_ROOT} ]]; then
|
||||
local group="${dir/${PMODULES_ROOT}\/}"
|
||||
group="${group%%/*}"
|
||||
else
|
||||
local group="${dir}"
|
||||
fi
|
||||
if (( ${#opt_groups[@]} > 0 )) && [[ ! -v opt_groups[${group}] ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user