File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,8 @@ execute_dynamic_menu() {
61
61
source " /pg/apps/${app_name} .app"
62
62
fi
63
63
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} "
69
66
70
67
# Check if the function exists and execute it
71
68
if declare -f " $function_name " > /dev/null; then
You can’t perform that action at this time.
0 commit comments