From cb98a085d74531105a18b7974fc6250870955b5a Mon Sep 17 00:00:00 2001 From: MHL Date: Mon, 7 Oct 2024 09:11:49 -0500 Subject: [PATCH] refs #1296 sort volshell methods alphabetically in hh() output --- volatility3/cli/volshell/generic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/volatility3/cli/volshell/generic.py b/volatility3/cli/volshell/generic.py index c5eac36e2..c1ca7b5fa 100644 --- a/volatility3/cli/volshell/generic.py +++ b/volatility3/cli/volshell/generic.py @@ -112,7 +112,7 @@ class Volshell(interfaces.plugins.PluginInterface): variables = [] print("\nMethods:") - for aliases, item in self.construct_locals(): + for aliases, item in sorted(self.construct_locals()): name = ", ".join(aliases) if item.__doc__ and callable(item): print(f"* {name}") @@ -125,8 +125,7 @@ class Volshell(interfaces.plugins.PluginInterface): print(f" {var}") def construct_locals(self) -> List[Tuple[List[str], Any]]: - """Returns a dictionary listing the functions to be added to the - environment.""" + """Returns a listing of the functions to be added to the environment.""" return [ (["dt", "display_type"], self.display_type), (["db", "display_bytes"], self.display_bytes),