Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pmodules
src
Commits
be117060
Commit
be117060
authored
Sep 03, 2020
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modulecmd.bash.in: implement use-flags with arrays
parent
ccb02fdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Pmodules/modulecmd.bash.in
Pmodules/modulecmd.bash.in
+4
-4
No files found.
Pmodules/modulecmd.bash.in
View file @
be117060
...
...
@@ -1033,7 +1033,7 @@ subcommand_use() {
done
std::info
"
\n
Used flags:
\n
"
for
flag
in
"
${
UseFlags
//
:/
}
"
;
do
for
flag
in
"
${
!UseFlags[@]
}
"
;
do
std::info
"
\t
${
flag
}
\n
"
done
...
...
@@ -1061,7 +1061,7 @@ subcommand_use() {
fi
if
[[
"
${
arg
}
"
=
~
"flag="
]]
;
then
# argument is flag
std::append_path UseFlags
"
${
arg
/flag=
}
"
UseFlags[
"
${
arg
/flag=
}
"
]=
1
return
fi
if
[[
-z
${
GroupDepths
[
${
arg
}
]
}
]]
&&
[[
-d
"
${
PMODULES_ROOT
}
/
${
arg
}
"
]]
;
then
...
...
@@ -1164,7 +1164,7 @@ subcommand_unuse() {
fi
if
[[
"
${
arg
}
"
=
~
"flag="
]]
;
then
# argument is flag
std::remove_path UseFlags
"
${
arg
/flag=
}
"
unset
UseFlags[
"
${
arg
/flag=
}
"
]
return
fi
if
[[
-n
${
GroupDepths
[
${
arg
}
]
}
]]
&&
...
...
@@ -1338,7 +1338,7 @@ pmodules_init() {
declare
-gx
MODULEPATH
=
''
declare
-Ag
GroupDepths
=
'()'
declare
-g
UseFlags
=()
declare
-
A
g
UseFlags
=()
reset_modulepath
reset_used_groups
reset_used_releases
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment