A subjunctive with no main clause
Usually the subjunctive depends on a verb like querer or esperar. In wishes, blessings, curses and a few comment phrases it stands alone. English has frozen traces of the same thing: God bless you, Long live the King, So be it. Part of the Spanish system is a pattern you can use freely; the rest are fixed formulas you take over as they are.
Wishing with que
Que + subjunctive is the everyday way to wish someone well. English often uses a set phrase or an imperative: Enjoy your meal, Get well soon, Sleep well. In Spanish it is a clause you can adapt to the situation.
Que aproveche.
Enjoy your meal.
Also said to strangers who are eating.
Que te mejores pronto.
Get well soon.
Que tengáis buen viaje y que os lo paséis bien.
Have a good trip and have fun, all of you.
Mañana es la entrevista, ¿no? Que salga todo bien.
The interview's tomorrow, isn't it? I hope it all goes well.
Fixed formulas without que
These formulas often come from religious language but are also used by people who are not religious. The verb comes first and the subject follows.
¡Vivan los novios!
Here's to the happy couple!
Shouted at weddings.
Dios te bendiga, hija.
God bless you, dear.
Often from older people, meant warmly.
Dios no lo quiera, pero si pasa algo, llámame.
God forbid, but if anything happens, call me.
Mi abuelo, en paz descanse, era carpintero.
My grandfather, may he rest in peace, was a carpenter.
¡Válgame Dios, qué desastre!
Good heavens, what a mess!
Old-fashioned, often used jokingly today.
Cuando llegó la inspección, sálvese quien pueda.
When the inspectors arrived, it was every man for himself.
Comments and sighs
Some formulas comment on what is being said: they hedge, generalise or mock. With the imperfect subjunctive you also get exclamations that voice an impossible wish or a belated realisation.
Que yo sepa, nadie ha llamado.
As far as I know, nobody has called.
Que yo recuerde, nunca habíamos hablado de eso.
As far as I remember, we had never talked about that.
No es muy puntual que digamos.
He's not exactly punctual.
Ironic understatement, usually after a negative.
¿Un mes de vacaciones? ¡Quién pudiera!
A month's holiday? I wish!
¿Que era su hermano? ¡Acabáramos!
That was her brother? Oh, now it all makes sense!
When something finally becomes clear.