I usually start the onions in EVOO/Butter/ghee with S&P on a medium heat for about 15 minutes to get them soft and translucent. I add the chopped garlic and stir to get the garlic starting to cook. Cook the garlic about 2-3 minutes, add the sherry (you can base the amount of liquid on how much onion you have in the pan), brown sugar and drops of vanilla before the garlic starts to burn. This is the height of the aroma's!! Continue on medium to low and stir until you get the color you are looking for. If it is drying out, add another dash of sherry. Sorry, don't have a recipe, I usually use 2 medium sized onions, a couple of table spoons of EVOO/butter/ghee, a couple of tablespoons garlic, couple teaspoons brown sugar and sherry to deglaze the pan and continue saute the onions. Start to finish is about 30 - 40 minutes. It can go longer if you want to caramelize the onions even more.
I did not add mushrooms in this description, but they go great as well. I usually add the mushrooms if I make them with the onions, right before adding the sherry. I toss them with the onions then add the sherry. It might not sound like they should go together, but try mushrooms with a little vanilla. You will not be disappointed if you like mushrooms.
Looking forward to hearing how it all works out. Thanks.