Skip to content

Commit 80c032f

Browse files
committed
test
1 parent 97f6e09 commit 80c032f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mods/scripts/apps/interface.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ execute_dynamic_menu() {
6161
source "/pg/apps/${app_name}.app"
6262
fi
6363

64-
# Get the selected option name (e.g., "Plex Token")
65-
local selected_name=$(echo "${dynamic_menu_items[$((selected_option-1))]}" | awk '{$1=""; print $0}' | xargs) # Trim spaces and get full menu item name
66-
67-
# Convert the selected_name to lowercase, replace spaces with underscores, and remove trailing underscores
68-
local function_name=$(echo "$selected_name" | tr '[:upper:]' '[:lower:]' | tr ' ' '_' | sed 's/_$//')
64+
# Construct the function name as menuN where N is the selected_option
65+
local function_name="menu${selected_option}"
6966

7067
# Check if the function exists and execute it
7168
if declare -f "$function_name" > /dev/null; then

0 commit comments

Comments
 (0)