commit d1ce6be60bbdf9269dba2be78a544ab62c34e17c
parent 2144755af669c87e5e67182fb094115110ad1bf0
Author: Michael Savage <mikejsavage@gmail.com>
Date: Thu, 1 May 2014 22:46:43 +0100
Sort the output of pdb list
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/pdb b/pdb
@@ -188,7 +188,14 @@ elseif arg[ 1 ] == "delete" then
db[ arg[ 2 ] ] = nil
elseif arg[ 1 ] == "list" then
+ local passwords = { }
+
for k in pairs( db ) do
+ table.insert( passwords, k )
+ end
+ table.sort( passwords )
+
+ for _, k in ipairs( passwords ) do
print( k )
end
elseif arg[ 1 ] == "gen" then