From 30ffb0f6bb9b802374503daa305b165c9e327186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Sat, 6 Apr 2024 00:24:26 +0200 Subject: [PATCH] Update zpi tool with new features and improvements: - Updated tool name to "Zrep Package Installer" - Modified installation directory prompt - Renamed commands related to zrep to zpi - Updated help messages and usage instructions - Improved package management functionality --- zpi | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/zpi b/zpi index 7bbd9ce..99423a6 100755 --- a/zpi +++ b/zpi @@ -3,7 +3,7 @@ setopt extendedglob VERSION="0.0.8" # Fri-2024-04-05 -ZREP="Zsh Repository Tool" +ZREP="Zrep Package Installer" # Define the default path to .zreprc ZREP_CONFIG="${HOME}/.zreprc" @@ -234,7 +234,7 @@ function zrep_init() { if [[ ! -f ${ZREP_CONFIG} ]]; then echo "${ZREP_CONFIG} not found. Creating it..." # Prompt user for install directory - read "install_dir?Enter zrep installation directory [${HOME}/.zrep]: " + read "install_dir?Enter zpi installation directory [${HOME}/.zrep]: " install_dir=${install_dir:-"${HOME}/.zrep"} mkdir -p ${install_dir} read "downloader?Choose command to download packages [curl, wget, wget2]: " @@ -857,18 +857,18 @@ function zrep_disable() { # Help function to display available options function zrep_help() { - zrep_msg sub "\nUsage: zrep [arguments]" + zrep_msg sub "\nUsage: ${ZSH_SCRIPT:t} [arguments]" zrep_msg info "Available commands:" - if [[ ! -f ${ZREP_CONFIG} ]]; then - zrep_msg info " init: Initialize zrep" - fi + if [[ ! -f ${ZREP_CONFIG} ]]; then + zrep_msg info " init: Initialize zpi" + fi zrep_msg info " install (i) :\t\t\tInstall a package" zrep_msg info " remove (rm, delete, del) :\tRemove a package" - zrep_msg info " update (u) :\t\t\tUpdate zrep package" - zrep_msg info " enable :\t\t\tEnable zrep package" - zrep_msg info " disable :\t\t\tDisable zrep package" + zrep_msg info " update (u) :\t\t\tUpdate zpi package" + zrep_msg info " enable :\t\t\tEnable zpi package" + zrep_msg info " disable :\t\t\tDisable zpi package" zrep_msg info " search 'search term':\t\t\t\tSearch for authors, packages or description" - zrep_msg info " version:\t\t\t\t\tDisplay zrep version" + zrep_msg info " version:\t\t\t\t\tDisplay zpi version" zrep_msg info " list:\t\t\t\t\t\tList installed packages" zrep_msg info " help:\t\t\tDisplay help for package (if available)" @@ -952,7 +952,7 @@ function main() { # Parse the command argument to extract the package name zrep_remove_package_name="${2:-}" if [[ -z "${zrep_remove_package_name}" ]]; then - zrep_msg info "\nUsage: zrep ${1} author/package" + zrep_msg info "\nUsage: zpi ${1} author/package" else zrep_remove_package "${zrep_remove_package_name}" fi