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:
Narvin Singh 2020-12-28 11:06:03 -05:00
parent d05a68932b
commit 2355282d88
2 changed files with 2 additions and 6 deletions

View File

@ -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 "$@"

View File

@ -1,6 +1,6 @@
#!/bin/bash
run () {
mod_dt () {
# Customizable configuration constants
local -r DEFAULT_FMT='%a %d %I:%M%p'
local -r DEFAULT_PRE=''
@ -13,5 +13,3 @@ run () {
printf '%b%b%b' "${pre}" "$(date +"${fmt}")" "${suf}"
}
run "$@"