Welcome,

telling the true a second "~" needs "\" too, so the function should be defined 
as

_quote_readline_by_ref ()
{
        case $1 in
                '')printf -v $2 %s "$1";;
                \'*)printf -v $2 %s "${1:1}";;
                \~*)printf -v $2 \~%q "${1:1}";;
                ?*)printf -v $2 %q "$1"
        esac
        case ${!2} in \&*)eval $2=${!2};esac
}

Best regards

-- 
Adam Tlałka
System & Network Administration Group
IT Service Center, Gdańsk University of Technology, PL

Reply via email to