mirror of
https://github.com/envmodules/modules.git
synced 2026-06-07 00:25:05 +08:00
init: enable ERE on sed with '-E' argument rather '-r'
When enabling Extended Regular Expression (ERE) on sed command, use the '-E' argument (rather '-r') for compatibility with OS X's and BSDs' sed. 'sed -E' is used in bash and zsh completion scripts. ERE are required to interpret alternation character '|'. Fixes #178
This commit is contained in:
@@ -21,7 +21,7 @@ _module_savelist() {
|
||||
}
|
||||
|
||||
_module_not_yet_loaded() {
|
||||
_module_avail | sort | sed -r "\%^(${LOADEDMODULES//:/|})$%d"
|
||||
_module_avail | sort | sed -E "\%^(${LOADEDMODULES//:/|})$%d"
|
||||
}
|
||||
|
||||
_module_long_arg_list() {
|
||||
|
||||
@@ -25,7 +25,7 @@ _module_savelist() {
|
||||
}
|
||||
|
||||
_module_not_yet_loaded() {
|
||||
_module_avail | sort | sed -r "\%^(${LOADEDMODULES//:/|})$%d"
|
||||
_module_avail | sort | sed -E "\%^(${LOADEDMODULES//:/|})$%d"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user