Update zrep script to display a newline before "No packages installed" message.

Add newline character before the message to improve readability.
This commit is contained in:
Stig-Ørjan Smelror 2024-03-15 22:56:38 +01:00
parent b160120893
commit e314131622

4
zrep
View File

@ -301,7 +301,7 @@ function zrep_list_installed_packages() {
# Check if installed.json exists and is not empty # Check if installed.json exists and is not empty
if [[ ! -s "${installed_json}" ]]; then if [[ ! -s "${installed_json}" ]]; then
zrep_msg info "No packages installed." zrep_msg info "\nNo packages installed."
return return
fi fi
@ -310,7 +310,7 @@ function zrep_list_installed_packages() {
# Check if the JSON file is effectively empty ({} or []) # Check if the JSON file is effectively empty ({} or [])
if jq -e 'if type == "object" then . == {} elif type == "array" then . == [] else false end' "${installed_json}" >/dev/null; then if jq -e 'if type == "object" then . == {} elif type == "array" then . == [] else false end' "${installed_json}" >/dev/null; then
zrep_msg info "No packages installed." zrep_msg info "\nNo packages installed."
return return
fi fi