From f5d3b9c2fe0cb38c97cb56d7957187e1cad90b4e Mon Sep 17 00:00:00 2001 From: zenobit Date: Mon, 6 Jan 2025 07:06:30 +0100 Subject: [PATCH] fix --- apptui | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apptui b/apptui index 6ec08ede8..7ce5ba641 100755 --- a/apptui +++ b/apptui @@ -56,6 +56,12 @@ if command -v am >/dev/null 2>&1; then am_version=$(am version) && am_installed=1 fi +# shellcheck source=/dev/null +change_config() { + old_value=$(grep '=' < "$config" | grep "$item_name" | cut -d'=' -f2) + gum confirm "Change $item_name from $old_value to $new_value?" && change_config_item; source "$config" +} + # AppMan or AM? what_to_use() { while true @@ -95,12 +101,6 @@ if [ ! -f "$config" ]; then create_config what_to_use fi -# shellcheck source=/dev/null -change_config() { - old_value=$(grep '=' < "$config" | grep "$item_name" | cut -d'=' -f2) - gum confirm "Change $item_name from $old_value to $new_value?" && change_config_item; source "$config" -} - # shellcheck source=/dev/null source "$config"