Get autocompletion when invoking a "read" inside a Bash script

Solution 1:

Try:

read -e -p "Glassfish Path:" GF_DIR

-e enables readline:

 -e 
    If the standard input is coming from a terminal, Readline is used
    to obtain the line.