From 933b27b167044cbf22e2490e65e8450e2436d781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Sun, 7 Apr 2024 01:28:51 +0200 Subject: [PATCH] Update zrep functions to use `function` keyword for consistency. - Updated `zrep_load_theme` to use `function` keyword. - Updated `zrep_search_url_encode` to use `function` keyword. - Updated `zrep_search` to use `function` keyword. --- zpi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zpi b/zpi index 5b03f08..963a531 100755 --- a/zpi +++ b/zpi @@ -84,7 +84,7 @@ typeset -A base_colors=( # Define the global associative array to hold the current theme declare -A current_theme -zrep_load_theme() { +function zrep_load_theme() { local theme_name="$1" local theme_file="${config[main_zrep_install_dir]}/themes/${theme_name}" @@ -137,7 +137,7 @@ function zrep_msg() { ################################################################################################# # Function to URL-encode strings in Zsh -zrep_search_url_encode() { +function zrep_search_url_encode() { local string="${1}" local strlen=${#string} local encoded="" @@ -156,7 +156,7 @@ zrep_search_url_encode() { } # Function to perform a search query and process JSON response -zrep_search() { +function zrep_search() { local searchTerm="${@}" local encodedSearch=$(zrep_search_url_encode "${searchTerm}")