Fix: Change module function names to be unique
The code for each module is wrapped in a function so the module can be parameterized, and so its variables can be scoped to the function. However, the function names must be unique, otherwise when the modules are sourced, functions will overwrite functions with the same name in previously sourced modules.
This commit is contained in:
parent
d05a68932b
commit
2355282d88
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
run () {
|
||||
mod_bat () {
|
||||
# Customizable configuration constants
|
||||
local -r DEFAULT_CNT=1
|
||||
local -r DEFAULT_PRE_PLG=' '
|
||||
@ -53,5 +53,3 @@ run () {
|
||||
printf '%b' "${res:1}"
|
||||
}
|
||||
|
||||
run "$@"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user