Minor changes and cleanups

This commit is contained in:
Stig-Ørjan Smelror 2024-03-10 14:03:27 +01:00
parent 02ae618bf1
commit 77eb36815b

7
zrep
View File

@ -548,18 +548,17 @@ function main() {
case "${1}" in case "${1}" in
init) init)
zrep_init zrep_init
zrep_fpath ${config[main_zrep_install_dir]} # zrep_fpath ${config[main_zrep_install_dir]}
exit exit
;; ;;
install | i) install | i)
zrep_msg info "Install function here"
zrep_install_package ${1} zrep_install_package ${1}
;; ;;
remove | delete | rm) remove | delete | rm)
# Parse the command argument to extract the package name # Parse the command argument to extract the package name
zrep_remove_package_name="${2:-}" zrep_remove_package_name="${2:-}"
if [[ -z "${zrep_remove_package_name}" ]]; then if [[ -z "${zrep_remove_package_name}" ]]; then
echo "Usage: zrep remove author/package" echo "Usage: zrep ${1} author/package"
else else
zrep_remove_package "${zrep_remove_package_name}" zrep_remove_package "${zrep_remove_package_name}"
fi fi
@ -578,11 +577,9 @@ function main() {
;; ;;
enable) enable)
zrep_enable ${2} zrep_enable ${2}
source "${HOME}/.zrep_addons"
;; ;;
disable) disable)
zrep_disable ${2} zrep_disable ${2}
source "${HOME}/.zrep_addons"
;; ;;
*) *)
zrep_help zrep_help