wp_list_categories()
uses the Walker_Category
walker which applies the list_cats
filter, so a little PHP and:
function alpha_prefix_wpse_210205($cat) {
$fl = substr($cat,0,1);
$fl = strtoupper($fl);
return $fl.' '.$cat;
}
add_filter('list_cats','alpha_prefix_wpse_210205');
You will want to apply the filter just before you need it and remove it afterwards.
function show_categories_fn(){
add_filter('list_cats','alpha_prefix_wpse_210205');
$lc = wp_list_categories("echo=0&title_li");
remove_filter('list_cats','alpha_prefix_wpse_210205');
return $lc;
}
add_shortcode('show_categories', 'show_categories_fn');