#!/bin/bash
PS3='Custom prompt'
 
menu_as_function()
{
select var
# 'select' uses $@ as list when "in" is not specified
 do
  echo ${var}
  break
 done
}
 
menu_as_function item1 item2 item3 an_item_out_of_order
# parameters are passed as if the function was a program or shell command
 

