On 2008-01-04, at 13:50, Aaron Crane wrote:
function rename_function { local old=$1 new=$2 eval "$(declare -f $old | sed "1s/^$old/$new/")" unset -f $old }
Neat trick!I would make that "1s/^$old /$new /" myself, and quote "$old" and "$1" and so on...