Extract subroutine to Complete::Util::format_completion