On Jan 4, 2008 2:50 PM, Aaron Crane <[email protected]> wrote:
> Peter da Silva writes:
> > Unfortunately there doesn't seem to be a way to rename functions in
> > bash.
>
> I beg to differ.
>
>   function rename_function {
>       local old=$1 new=$2
>       eval "$(declare -f $old | sed "1s/^$old/$new/")"
>       unset -f $old
>   }

rename_function foo foo
rename_function bar

> --
> Aaron Crane
>
>



-- 
There is this special biologist word we use for 'stable'. It is
'dead'. -- Jack Cohen

Reply via email to