Make the existing '#vanquished' command be available during regular
play, with M-V bound to it. 'm #vanquished' or 'm M-V' brings up
the sorting menu that you get when answering 'a' rather than 'y' at
the end-of-game "disclose vanquished creatures?" prompt.
The original #vanquished came from slash'em, where it was available
in normal play. When added to nethack, it was put in as wizard-mode-
only. I added the sorting capability several years ago.
The chosen sort is remembered and re-used if not reset but only for
the remainder of the current session. It probably ought of become
a run-time option so be settable in advance and across sessions but
I haven't done that.