Added conditional check to load config and theme only if argument is not "init".

This commit is contained in:
Stig-Ørjan Smelror 2024-03-16 00:14:36 +01:00
parent dd518d733b
commit fcf519dd68

6
zrep
View File

@ -817,8 +817,10 @@ function zrep_read_usage() {
function main() { function main() {
zrep_main_version_string zrep_main_version_string
zrep_load_config ${1} if [[ ${1} != "init" ]]; then
zrep_load_theme ${config[global_theme]} zrep_load_config ${1}
zrep_load_theme ${config[global_theme]}
fi
# Check if the second argument is "help" and the first argument is not empty # Check if the second argument is "help" and the first argument is not empty
if [[ "${2}" == "help" && -n "${1}" ]]; then if [[ "${2}" == "help" && -n "${1}" ]]; then